add a few #defines to fix OS X
authorMatt <matt@uncensored.citadel.org>
Fri, 31 Oct 2008 04:28:33 +0000 (04:28 +0000)
committerMatt <matt@uncensored.citadel.org>
Fri, 31 Oct 2008 04:28:33 +0000 (04:28 +0000)
webcit/configure.ac
webcit/webcit.h
webcit/webserver.c

index 6a5261d9ac0b03da3b04d4ecb6f0125e930ec3d6..d89ee28b103bbc80c72b257b9b9c2b8177ebee3b 100644 (file)
@@ -51,6 +51,8 @@ case "$host" in
        *-*-solaris*)
                PTHREAD_DEFS='-D_REENTRANT -D_PTHREADS'
        ;;
+       *-*-darwin*)
+               LIBS=-lintl
 esac
 AC_SUBST(PTHREAD_DEFS)
 
index 02b7ac6a228912ed7abe495296385ad9fdbd89fd..aba1fb7992db276e3a9294d7835a6d7e269f9bdc 100644 (file)
@@ -49,6 +49,9 @@
 #endif
 
 #ifdef ENABLE_NLS
+#ifdef __APPLE__
+#include <xlocale.h>
+#endif
 #include <libintl.h>
 #include <locale.h>
 #ifdef HAVE_USELOCALE
index ce9affa28e289975264a3c3b3adfd9870bd0ea10..12497ce960003f0bc0984a380844bbf8b83198e7 100644 (file)
@@ -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));