sites

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

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

Compiling ii.c on Solaris generated an error as per http://paste.debian.net/1041906/ "ii.c:341:21: error: expected identifier or ‘(’ before numeric constant"
 This seems to be as "sun" is used else where, a simple fix was to rename it to "sunn"
Also On Solaris systems we still need to include some extra librarys namely "sockets" so i added this to config.mk

Diffstat:
tools.suckless.org/ii/patches/ii-solarisbuild-20180912-b25423f.patch | 74++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 74 insertions(+), 0 deletions(-)

diff --git a/tools.suckless.org/ii/patches/ii-solarisbuild-20180912-b25423f.patch b/tools.suckless.org/ii/patches/ii-solarisbuild-20180912-b25423f.patch @@ -0,0 +1,74 @@ +From d5b8f78857f62247f6efbccfb9382549d56ccf3e Mon Sep 17 00:00:00 2001 +From: drowl <mail@catsnest.co.uk> +Date: Wed, 12 Sep 2018 16:56:16 +0100 +Subject: [PATCH] =?UTF-8?q?Compiling=20ii.c=20on=20Solaris=20generated=20a?= + =?UTF-8?q?n=20error=20as=20per=20http://paste.debian.net/1041906/=20"ii.c?= + =?UTF-8?q?:341:21:=20error:=20expected=20identifier=20or=20=E2=80=98(?= + =?UTF-8?q?=E2=80=99=20before=20numeric=20constant"=20=20This=20seems=20to?= + =?UTF-8?q?=20be=20as=20"sun"=20is=20used=20else=20where,=20a=20simple=20f?= + =?UTF-8?q?ix=20was=20to=20rename=20it=20to=20"sunn"=20Also=20On=20Solaris?= + =?UTF-8?q?=20systems=20we=20still=20need=20to=20include=20some=20extra=20?= + =?UTF-8?q?librarys=20namely=20"sockets"=20so=20i=20added=20this=20to=20co?= + =?UTF-8?q?nfig.mk?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + config.mk | 6 +++++- + ii.c | 10 +++++----- + 2 files changed, 10 insertions(+), 6 deletions(-) + +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); + } +-- +2.15.0 +