summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/acconfig.h1
-rw-r--r--source3/configure.in21
-rw-r--r--source3/include/config.h.in4
-rw-r--r--source3/include/includes.h2
-rw-r--r--source3/nsswitch/winbind_nss_config.h2
5 files changed, 24 insertions, 6 deletions
diff --git a/source3/acconfig.h b/source3/acconfig.h
index cdb4b8235a..04e7222bda 100644
--- a/source3/acconfig.h
+++ b/source3/acconfig.h
@@ -154,3 +154,4 @@
#undef HAVE_SNPRINTF_DECL
#undef HAVE_VSNPRINTF_DECL
#undef HAVE_NATIVE_ICONV
+#undef HAVE_UNIXSOCKET
diff --git a/source3/configure.in b/source3/configure.in
index ce66eef973..8e4f8784ee 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -250,7 +250,7 @@ AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h)
AC_CHECK_HEADERS(unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h)
AC_CHECK_HEADERS(compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h)
-AC_CHECK_HEADERS(sys/param.h ctype.h sys/un.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h)
+AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h)
AC_CHECK_HEADERS(sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h sys/socket.h)
AC_CHECK_HEADERS(sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h)
AC_CHECK_HEADERS(sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h)
@@ -311,6 +311,25 @@ AC_CHECK_LIB(cups,httpConnect)
AC_CHECK_LIB(dl, dlopen, [LIBS="$LIBS -ldl";
AC_DEFINE(HAVE_LIBDL)])
+############################################
+# check for unix domain sockets
+AC_CACHE_CHECK([for unix domain sockets],samba_cv_unixsocket, [
+ AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <sys/socket.h>
+#include <sys/un.h>],
+[
+ struct sockaddr_un sunaddr;
+ sunaddr.sun_family = AF_UNIX;
+],
+ samba_cv_unixsocket=yes,samba_cv_unixsocket=no)])
+if test x"$samba_cv_unixsocket" = x"yes"; then
+ AC_DEFINE(HAVE_UNIXSOCKET)
+fi
+
+
AC_CACHE_CHECK([for socklen_t type],samba_cv_socklen_t, [
AC_TRY_COMPILE([
#include <sys/types.h>
diff --git a/source3/include/config.h.in b/source3/include/config.h.in
index a76aee4005..7bf9923368 100644
--- a/source3/include/config.h.in
+++ b/source3/include/config.h.in
@@ -217,6 +217,7 @@
#undef HAVE_SNPRINTF_DECL
#undef HAVE_VSNPRINTF_DECL
#undef HAVE_NATIVE_ICONV
+#undef HAVE_UNIXSOCKET
/* The number of bytes in a int. */
#undef SIZEOF_INT
@@ -947,9 +948,6 @@
/* Define if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
-/* Define if you have the <sys/un.h> header file. */
-#undef HAVE_SYS_UN_H
-
/* Define if you have the <sys/unistd.h> header file. */
#undef HAVE_SYS_UNISTD_H
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 87547f5253..2caeb255bd 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -107,7 +107,7 @@
#include <sys/socket.h>
#endif
-#ifdef HAVE_SYS_UN_H
+#ifdef HAVE_UNIXSOCKET
#include <sys/un.h>
#endif
diff --git a/source3/nsswitch/winbind_nss_config.h b/source3/nsswitch/winbind_nss_config.h
index a946db89f6..4902f6ec5c 100644
--- a/source3/nsswitch/winbind_nss_config.h
+++ b/source3/nsswitch/winbind_nss_config.h
@@ -43,7 +43,7 @@
#include <sys/socket.h>
#endif
-#ifdef HAVE_SYS_UN_H
+#ifdef HAVE_UNIXSOCKET
#include <sys/un.h>
#endif