NETLINK_TCPDIAG and NETLINK_NFLOG aren't defined on older Linux

systems; define these conditionally.
This commit is contained in:
Guido van Rossum 2006-02-21 01:07:27 +00:00
parent c255c7bef7
commit 668a94a34f
1 changed files with 4 additions and 0 deletions

View File

@ -4029,8 +4029,12 @@ init_socket(void)
PyModule_AddIntConstant(m, "NETLINK_SKIP", NETLINK_SKIP);
PyModule_AddIntConstant(m, "NETLINK_USERSOCK", NETLINK_USERSOCK);
PyModule_AddIntConstant(m, "NETLINK_FIREWALL", NETLINK_FIREWALL);
#ifdef NETLINK_TCPDIAG
PyModule_AddIntConstant(m, "NETLINK_TCPDIAG", NETLINK_TCPDIAG);
#endif
#ifdef NETLINK_NFLOG
PyModule_AddIntConstant(m, "NETLINK_NFLOG", NETLINK_NFLOG);
#endif
#ifdef NETLINK_XFRM
PyModule_AddIntConstant(m, "NETLINK_XFRM", NETLINK_XFRM);
#endif