From: Giampaolo Rodola' Date: Tue, 21 May 2013 19:02:04 +0000 (+0200) Subject: Fix issue #17996: expose socket.AF_LINK constant on BSD and OSX. X-Git-Tag: v3.4.0a1~657 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=80e1c43ddf8099d0ebc4735d405942c4c5f6925c;p=thirdparty%2FPython%2Fcpython.git Fix issue #17996: expose socket.AF_LINK constant on BSD and OSX. --- diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index aa59f7fc439c..edd196a89bac 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -293,6 +293,11 @@ The module :mod:`socket` exports the following constants and functions: TIPC related constants, matching the ones exported by the C socket API. See the TIPC documentation for more information. +.. data:: AF_LINK + + Availability: BSD, OSX. + + .. versionadded:: 3.4 .. data:: has_ipv6 diff --git a/Misc/NEWS b/Misc/NEWS index 2027e65f3e84..a025c7073edb 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -99,6 +99,8 @@ Core and Builtins Library ------- +- Issue #17996: socket module now exposes AF_LINK constant on BSD and OSX. + - Issue #17900: Allowed pickling of recursive OrderedDicts. Decreased pickled size and pickling time. diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 20db3d94641c..fa75a102f24f 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -5658,6 +5658,9 @@ PyInit__socket(void) /* Alias to emulate 4.4BSD */ PyModule_AddIntMacro(m, AF_ROUTE); #endif +#ifdef AF_LINK + PyModule_AddIntMacro(m, AF_LINK); +#endif #ifdef AF_ASH /* Ash */ PyModule_AddIntMacro(m, AF_ASH);