Kaydet (Commit) 95e0df83 authored tarafından Berker Peksag's avatar Berker Peksag

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.
üst e1d22fda
......@@ -6495,7 +6495,10 @@ PyInit__socket(void)
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment