summaryrefslogtreecommitdiff
path: root/lib/replace/wscript
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-04-24 19:28:48 +0200
committerStefan Metzmacher <metze@samba.org>2010-04-24 20:30:23 +0200
commitdb29b2d6d2dfdebb91292b0640642c545fbce025 (patch)
treea8e56d8465e2630975bcfe8a11b7c1cf944ad25c /lib/replace/wscript
parente06cf3950252a46486aa046a4552ed6ebff175b3 (diff)
downloadsamba-db29b2d6d2dfdebb91292b0640642c545fbce025.tar.gz
samba-db29b2d6d2dfdebb91292b0640642c545fbce025.tar.bz2
samba-db29b2d6d2dfdebb91292b0640642c545fbce025.zip
lib/replace/wscript: add replacement for IPV6_V6ONLY on linux systems with broken headers
This is needed on SLES8. metze
Diffstat (limited to 'lib/replace/wscript')
-rw-r--r--lib/replace/wscript19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 63acf26062..9f51431e8c 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -99,6 +99,25 @@ def configure(conf):
'socket nsl', checklibc=True,
headers='sys/socket.h netinet/in.h arpa/inet.h netdb.h')
+ # Some old Linux systems have broken header files and
+ # miss the IPV6_V6ONLY define in netinet/in.h,
+ # but have it in linux/in6.h.
+ # We can't include both files so we just check if the value
+ # if defined and do the replacement in system/network.h
+ if not conf.CHECK_VARIABLE('IPV6_V6ONLY',
+ headers='sys/socket.h netdb.h netinet/in.h'):
+ conf.CHECK_CODE('''
+ #include <linux/in6.h>
+ #if (IPV6_V6ONLY != 26)
+ #error no IPV6_V6ONLY support on linux
+ #endif
+ int main(void) { return IPV6_V6ONLY; }
+ ''',
+ define='HAVE_LINUX_IPV6_V6ONLY_26',
+ addmain=False,
+ msg='Checking for IPV6_V6ONLY in linux/in6.h',
+ local_include=False)
+
conf.CHECK_CODE('''
struct sockaddr_storage sa_store;
struct addrinfo *ai = NULL;