summaryrefslogtreecommitdiffstats
path: root/lib/replace
diff options
context:
space:
mode:
authorMatt Kraai <mkraai@beckman.com>2009-08-12 08:49:24 +0200
committerStefan Metzmacher <metze@samba.org>2009-08-12 13:27:39 +0200
commit91d13b68be55728a85b3832e2da9267dbf4f2464 (patch)
tree4b22dd758d9fb30c190225adc5b74a6e12941126 /lib/replace
parente96338bf2b9ff6767a54c6127cdda34591b98c0d (diff)
downloadsamba-91d13b68be55728a85b3832e2da9267dbf4f2464.tar.gz
samba-91d13b68be55728a85b3832e2da9267dbf4f2464.tar.xz
samba-91d13b68be55728a85b3832e2da9267dbf4f2464.zip
libreplace: undef AI_ADDRCONFIG on QNX 6.3.0 (fix bug #6630)
Some of the functions in source3/lib/util_sock.c use AI_ADDRCONFIG. On QNX 6.3.0, this macro is defined but, if it's used, getaddrinfo will fail. This prevents smbd from opening any sockets. If I undefine AI_ADDRCONFIG on such systems and allow lib/replace/system/network.h to define it to be 0, this works around the issue. Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'lib/replace')
-rw-r--r--lib/replace/system/network.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/replace/system/network.h b/lib/replace/system/network.h
index c8364101a9f..1f510350bd9 100644
--- a/lib/replace/system/network.h
+++ b/lib/replace/system/network.h
@@ -195,6 +195,20 @@ int rep_socketpair(int d, int type, int protocol, int sv[2]);
#endif
#endif
+/*
+ * Some of the functions in source3/lib/util_sock.c use AI_ADDRCONFIG. On QNX
+ * 6.3.0, this macro is defined but, if it's used, getaddrinfo will fail. This
+ * prevents smbd from opening any sockets.
+ *
+ * If I undefine AI_ADDRCONFIG on such systems and define it to be 0,
+ * this works around the issue.
+ */
+#ifdef __QNX__
+#include <sys/neutrino.h>
+#if _NTO_VERSION == 630
+#undef AI_ADDRCONFIG
+#endif
+#endif
#ifndef AI_ADDRCONFIG
/*
* logic copied from AI_NUMERICHOST