From 9e6490da33cf74a043e214a3dc10bf620f3f1725 Mon Sep 17 00:00:00 2001 From: Ross Mohn Date: Fri, 26 Sep 2014 21:07:32 +0200 Subject: [PATCH] AIX support --- abduco.c | 4 ++-- config.mk | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/abduco.c b/abduco.c index ef74e03..82e0dbf 100644 --- a/abduco.c +++ b/abduco.c @@ -217,7 +217,7 @@ static void usage() { static int create_socket_dir() { size_t maxlen = sizeof(sockaddr.sun_path); char *dirs[] = { getenv("HOME"), getenv("TMPDIR"), "/tmp" }; - int socketfd = socket(AF_LOCAL, SOCK_STREAM, 0); + int socketfd = socket(AF_UNIX, SOCK_STREAM, 0); if (socketfd == -1) return -1; for (unsigned int i = 0; i < countof(dirs); i++) { @@ -265,7 +265,7 @@ static int create_socket(const char *name) { strncat(sockaddr.sun_path, name, maxlen - strlen(sockaddr.sun_path) - 1); strncat(sockaddr.sun_path, server.host, maxlen - strlen(sockaddr.sun_path) - 1); } - return socket(AF_LOCAL, SOCK_STREAM, 0); + return socket(AF_UNIX, SOCK_STREAM, 0); } static bool create_session(const char *name, char * const argv[]) { diff --git a/config.mk b/config.mk index 10d3ba5..cbf448c 100644 --- a/config.mk +++ b/config.mk @@ -9,6 +9,9 @@ MANPREFIX = ${PREFIX}/share/man INCS = -I. LIBS = -lc -lutil +# AIX +#LIBS = -lc + # Solaris #LIBS = -lc -lsocket -- 2.11.4.GIT