mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
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
1 changed files with 3 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue