From 8c04e5615f9f39b668fb8bc024408abd5ab59f31 Mon Sep 17 00:00:00 2001 From: Matt Date: Fri, 31 Oct 2008 04:28:33 +0000 Subject: [PATCH] add a few #defines to fix OS X --- webcit/configure.ac | 2 ++ webcit/webcit.h | 3 +++ webcit/webserver.c | 2 ++ 3 files changed, 7 insertions(+) diff --git a/webcit/configure.ac b/webcit/configure.ac index 6a5261d9a..d89ee28b1 100644 --- a/webcit/configure.ac +++ b/webcit/configure.ac @@ -51,6 +51,8 @@ case "$host" in *-*-solaris*) PTHREAD_DEFS='-D_REENTRANT -D_PTHREADS' ;; + *-*-darwin*) + LIBS=-lintl esac AC_SUBST(PTHREAD_DEFS) diff --git a/webcit/webcit.h b/webcit/webcit.h index 02b7ac6a2..aba1fb799 100644 --- a/webcit/webcit.h +++ b/webcit/webcit.h @@ -49,6 +49,9 @@ #endif #ifdef ENABLE_NLS +#ifdef __APPLE__ +#include +#endif #include #include #ifdef HAVE_USELOCALE diff --git a/webcit/webserver.c b/webcit/webserver.c index ce9affa28..12497ce96 100644 --- a/webcit/webserver.c +++ b/webcit/webserver.c @@ -113,10 +113,12 @@ int ig_tcp_server(char *ip_addr, int port_number, int queue_len) i = 1; setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &i, sizeof(i)); + #ifndef __APPLE__ fcntl(s, F_SETFL, O_NONBLOCK); /* maide: this statement is incorrect there should be a preceding F_GETFL and a bitwise OR with the previous fd flags */ + #endif if (bind(s, (struct sockaddr *) &sin, sizeof(sin)) < 0) { lprintf(1, "Can't bind: %s\n", strerror(errno)); -- 2.30.2