sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

commit ccc5b554211e2d7b2b57d8d2864f402c1c58440c
parent b4ec97363e177ba750328829c4fa80141bd2702d
Author: drowl <mail@catsnest.co.uk>
Date:   Wed, 12 Sep 2018 17:35:56 +0100

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

Diffstat:
tools.suckless.org/ii/patches/ii-1.8-solarisbuild.diff | 50++++++++++++++++++++++++++++++++++++++++++++++++++
tools.suckless.org/ii/patches/solarisbuild/index.md | 19+++++++++++++++++++
2 files changed, 69 insertions(+), 0 deletions(-)

diff --git a/tools.suckless.org/ii/patches/ii-1.8-solarisbuild.diff b/tools.suckless.org/ii/patches/ii-1.8-solarisbuild.diff @@ -0,0 +1,50 @@ +diff --git a/config.mk b/config.mk +index 957bae0..206a08c 100644 +--- a/config.mk ++++ b/config.mk +@@ -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 +@@ -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; + +@@ -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\n", 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\n", 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 @@ -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@catsnest.co.uk](mailto:mail@catsnest.co.uk)>