[Python-checkins] cpython: Issue #27702: Only expose SOCK_RAW when defined
berker.peksag
python-checkins at python.org
Mon Aug 8 07:05:41 EDT 2016
https://hg.python.org/cpython/rev/535f88ad80d8
changeset: 102570:535f88ad80d8
user: Berker Peksag <berker.peksag at gmail.com>
date: Mon Aug 08 14:07:05 2016 +0300
summary:
Issue #27702: Only expose SOCK_RAW when defined
SOCK_RAW is marked as optional in the POSIX specification:
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_socket.h.html
Patch by Ed Schouten.
files:
Modules/socketmodule.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -6495,7 +6495,10 @@
PyModule_AddIntMacro(m, SOCK_STREAM);
PyModule_AddIntMacro(m, SOCK_DGRAM);
/* We have incomplete socket support. */
+#ifdef SOCK_RAW
+ /* SOCK_RAW is marked as optional in the POSIX specification */
PyModule_AddIntMacro(m, SOCK_RAW);
+#endif
PyModule_AddIntMacro(m, SOCK_SEQPACKET);
#if defined(SOCK_RDM)
PyModule_AddIntMacro(m, SOCK_RDM);
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list