Put unixsocket calls between #ifdef HAVE_UNIXSOCKET's - required for Stratus VOS
authorJelmer Vernooij <jelmer@samba.org>
Sun, 15 Sep 2002 17:49:53 +0000 (17:49 +0000)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 15 Sep 2002 17:49:53 +0000 (17:49 +0000)
(Double checked)

source/lib/util_sock.c
source/nsswitch/wb_common.c

index 56ef4a6ab1cd028d0b97e5b9587681fd2c641772..fc2abf976f45512b299c5a7152e000e3127ff9de 100644 (file)
@@ -976,6 +976,7 @@ int create_pipe_sock(const char *socket_dir,
                     const char *socket_name,
                     mode_t dir_perms)
 {
+#ifdef HAVE_UNIXSOCKET
         struct sockaddr_un sunaddr;
         struct stat st;
         int sock;
@@ -1064,6 +1065,10 @@ int create_pipe_sock(const char *socket_dir,
         /* Success! */
         
         return sock;
+#else
+        DEBUG(0, ("create_pipe_sock: No Unix sockets on this system\n"));
+        return -1;
+#endif /* HAVE_UNIXSOCKET */
 }
 
 /*******************************************************************
index 88bda4eabe33188362ca3a6e27cc8dab51064865..51792f63fe2ef768b543032529bd75f81d1d4a74 100644 (file)
@@ -148,6 +148,7 @@ static int make_safe_fd(int fd)
 
 int winbind_open_pipe_sock(void)
 {
+#ifdef HAVE_UNIXSOCKET
        struct sockaddr_un sunaddr;
        static pid_t our_pid;
        struct stat st;
@@ -221,6 +222,9 @@ int winbind_open_pipe_sock(void)
        }
         
        return winbindd_fd;
+#else
+       return -1;
+#endif /* HAVE_UNIXSOCKET */
 }
 
 /* Write data to winbindd socket */