[3.12] gh-111253: Fix error checking in _socket module init (GH-111254) (#111299)

gh-111253: Fix error checking in _socket module init (GH-111254)
(cherry picked from commit 3052c098ca)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
Miss Islington (bot) 2023-11-01 21:01:28 +01:00 committed by GitHub
parent a94bdc2459
commit 99f0dd88b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -7703,10 +7703,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