gh-111253: Fix error checking in _socket module init (#111254)

This commit is contained in:
Nikita Sobolev 2023-10-25 10:11:04 +03:00 committed by GitHub
parent 86887a2084
commit 3052c098ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -0,0 +1 @@
Add error checking during :mod:`!_socket` module init.

View File

@ -7723,10 +7723,10 @@ socket_exec(PyObject *m)
/* FreeBSD divert(4) */
#ifdef PF_DIVERT
PyModule_AddIntMacro(m, PF_DIVERT);
ADD_INT_MACRO(m, PF_DIVERT);
#endif
#ifdef AF_DIVERT
PyModule_AddIntMacro(m, AF_DIVERT);
ADD_INT_MACRO(m, AF_DIVERT);
#endif
#ifdef AF_PACKET