summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2006-02-21 01:07:27 (GMT)
committerGuido van Rossum <guido@python.org>2006-02-21 01:07:27 (GMT)
commit668a94a34ffd2ce714d54ecc1f5bf6bccb2685d4 (patch)
tree269384a1ec8adc552405fd32733040633fd4c1ab /Modules/socketmodule.c
parentc255c7bef7621596869f56d887ac3ccd5b536708 (diff)
downloadcpython-668a94a34ffd2ce714d54ecc1f5bf6bccb2685d4.zip
cpython-668a94a34ffd2ce714d54ecc1f5bf6bccb2685d4.tar.gz
cpython-668a94a34ffd2ce714d54ecc1f5bf6bccb2685d4.tar.bz2
NETLINK_TCPDIAG and NETLINK_NFLOG aren't defined on older Linux
systems; define these conditionally.
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r--Modules/socketmodule.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 7368eb4..6ec15fd 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -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