[PATCH 2/2] Add correct variable names for _POSIX_IPV6 and _POSIX_RAW_SOCKETS

Siddhesh Poyarekar siddhesh@redhat.com
Fri Sep 12 11:13:00 GMT 2014


getconf only recognizes IPV6 and RAW_SOCKETS, when the standard
requires it to recognize the actual configuration variable name[1].  I
have not removed the earlier names for compatibility.

	* posix/getconf.c (vars): Add _POSIX_IPV6 and
	_POSIX_RAW_SOCKETS.

[1] http://pubs.opengroup.org/onlinepubs/007904875/functions/sysconf.html
---
 posix/getconf.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/posix/getconf.c b/posix/getconf.c
index db6acc4..c2c0d3f 100644
--- a/posix/getconf.c
+++ b/posix/getconf.c
@@ -1004,6 +1004,13 @@ static const struct conf vars[] =
     { "RAW_SOCKETS", _SC_RAW_SOCKETS, SYSCONF },
 #endif
 
+#ifdef _SC_IPV6
+    { "_POSIX_IPV6", _SC_IPV6, SYSCONF },
+#endif
+#ifdef _SC_RAW_SOCKETS
+    { "_POSIX_RAW_SOCKETS", _SC_RAW_SOCKETS, SYSCONF },
+#endif
+
     { NULL, 0, SYSCONF }
   };
 
-- 
1.9.3

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20140912/b9100e2b/attachment.sig>


More information about the Libc-alpha mailing list