From 1c1e7fb65828c99d6e0f0f3857089b559a0c8189 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 2 Jun 2016 23:30:11 -0400 Subject: Fix macro API for __USE_KERNEL_IPV6_DEFS. The use of __USE_KERNEL_IPV6_DEFS with ifndef is bad practice per: https://sourceware.org/glibc/wiki/Wundef. This change moves it to use 'if' and always define the macro. Please note that this is not the only problem with this code. I have a series of fixes after this one to resolve breakage with this code and add regression tests for it via compile-only source testing (to be discussed in another thread). Unfortunately __USE_KERNEL_XATTR_DEFS is set by the kernel and not glibc, and uses 'define', so we can't fix that yet. --- sysdeps/unix/sysv/linux/bits/in.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sysdeps/unix/sysv') diff --git a/sysdeps/unix/sysv/linux/bits/in.h b/sysdeps/unix/sysv/linux/bits/in.h index d75c07b9fd..9bdadf3c8f 100644 --- a/sysdeps/unix/sysv/linux/bits/in.h +++ b/sysdeps/unix/sysv/linux/bits/in.h @@ -30,7 +30,9 @@ /* This is not quite the same API since the kernel always defines s6_addr16 and s6_addr32. This is not a violation of POSIX since POSIX says "at least the following member" and that holds true. */ -# define __USE_KERNEL_IPV6_DEFS +# define __USE_KERNEL_IPV6_DEFS 1 +#else +# define __USE_KERNEL_IPV6_DEFS 0 #endif /* Options for use with `getsockopt' and `setsockopt' at the IP level. -- cgit v1.2.3