mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
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.
This commit is contained in:
@ -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.
|
||||
|
Reference in New Issue
Block a user