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.
This commit is contained in:
parent
e1d22fda7e
commit
95e0df8389
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue