[wiki] [sites] [ii] Adding a solarisbuild page and patch to enable building on Solaris || drowl

From: <git_AT_suckless.org>
Date: Wed, 12 Sep 2018 18:37:39 +0200

commit ccc5b554211e2d7b2b57d8d2864f402c1c58440c
Author: drowl <mail_AT_catsnest.co.uk>
Date: Wed Sep 12 17:35:56 2018 +0100

    [ii] Adding a solarisbuild page and patch to enable building on Solaris

diff --git a/tools.suckless.org/ii/patches/ii-1.8-solarisbuild.diff b/tools.suckless.org/ii/patches/ii-1.8-solarisbuild.diff
new file mode 100644
index 00000000..bac8f95f
--- /dev/null
+++ b/tools.suckless.org/ii/patches/ii-1.8-solarisbuild.diff
_AT_@ -0,0 +1,50 @@
+diff --git a/config.mk b/config.mk
+index 957bae0..206a08c 100644
+--- a/config.mk
++++ b/config.mk
+_AT_@ -6,9 +6,13 @@ PREFIX = /usr/local
+ MANPREFIX = ${PREFIX}/share/man
+ DOCPREFIX = ${PREFIX}/share/doc
+
++# On Solaris systems we still need to include some extra librarys namely "sockets"
++# Uncomment the next line if compiling on Solaris
++SOL_LIBS = -lsocket
++
+ # on systems which provide strlcpy(3),
+ # remove NEED_STRLCPY from CFLAGS and
+ # remove strlcpy.o from LIBS
+ CFLAGS = -DNEED_STRLCPY -Os
+ LDFLAGS = -s
+-LIBS = strlcpy.o
++LIBS = strlcpy.o ${SOL_LIBS}
+diff --git a/ii.c b/ii.c
+index 6c87314..b174088 100644
+--- a/ii.c
++++ b/ii.c
+_AT_@ -338,7 +338,7 @@ loginuser(int ircfd, const char *host, const char *fullname)
+ static int
+ udsopen(const char *uds)
+ {
+- struct sockaddr_un sun;
++ struct sockaddr_un sunn;
+ size_t len;
+ int fd;
+
+_AT_@ -347,13 +347,13 @@ udsopen(const char *uds)
+ exit(1);
+ }
+
+- sun.sun_family = AF_UNIX;
+- if (strlcpy(sun.sun_path, uds, sizeof(sun.sun_path)) >= sizeof(sun.sun_path)) {
++ sunn.sun_family = AF_UNIX;
++ if (strlcpy(sunn.sun_path, uds, sizeof(sunn.sun_path)) >= sizeof(sunn.sun_path)) {
+ fprintf(stderr, "%s: UNIX domain socket path truncation
", argv0);
+ exit(1);
+ }
+- len = strlen(sun.sun_path) + 1 + sizeof(sun.sun_family);
+- if (connect(fd, (struct sockaddr *)&sun, len) == -1) {
++ len = strlen(sunn.sun_path) + 1 + sizeof(sunn.sun_family);
++ if (connect(fd, (struct sockaddr *)&sunn, len) == -1) {
+ fprintf(stderr, "%s: connect: %s
", argv0, strerror(errno));
+ exit(1);
+ }
diff --git a/tools.suckless.org/ii/patches/solarisbuild/index.md b/tools.suckless.org/ii/patches/solarisbuild/index.md
new file mode 100644
index 00000000..29182dcf
--- /dev/null
+++ b/tools.suckless.org/ii/patches/solarisbuild/index.md
_AT_@ -0,0 +1,19 @@
+Solaris Build
+======
+
+Description
+-----------
+
+Building on Solaris 11 was failing for me due to a Compile error and a linker error.
+This simple patch fixed the issue for me on ii version 1.8 it might work for you too.
+
+Download
+--------
+
+* [ii-1.8-solarisbuild.diff](ii-1.8-solarisbuild.diff) Simple diff
+* [ii-solarisbuild-20180912-b25423f.patch](ii-solarisbuild.patch) patch format
+
+Author
+------
+
+* Dr Owl <[mail_AT_catsnest.co.uk](mailto:mail_AT_catsnest.co.uk)>
Received on Wed Sep 12 2018 - 18:37:39 CEST

This archive was generated by hypermail 2.3.0 : Wed Sep 12 2018 - 18:48:26 CEST