diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -293,6 +293,11 @@ 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/Modules/socketmodule.c b/Modules/socketmodule.c --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -5658,6 +5658,9 @@ /* 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);