summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-01-11 09:19:11 (GMT)
committerGeorg Brandl <georg@python.org>2008-01-11 09:19:11 (GMT)
commitff15c866a65981682923b62684a88c8053533385 (patch)
treec2d6ef1d2d1e2199c0b9f398b4b0d6fb1e317062 /Modules/socketmodule.c
parentd17315f1c2e1960221996f1ffed1d12f9d05e4b5 (diff)
downloadcpython-ff15c866a65981682923b62684a88c8053533385.zip
cpython-ff15c866a65981682923b62684a88c8053533385.tar.gz
cpython-ff15c866a65981682923b62684a88c8053533385.tar.bz2
Guard definition of TIPC_SUB_CANCEL with an #ifdef.
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r--Modules/socketmodule.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 4e340a6..c060dcd 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -4591,7 +4591,10 @@ init_socket(void)
/* for subscriptions */
PyModule_AddIntConstant(m, "TIPC_SUB_PORTS", TIPC_SUB_PORTS);
PyModule_AddIntConstant(m, "TIPC_SUB_SERVICE", TIPC_SUB_SERVICE);
- /* PyModule_AddIntConstant(m, "TIPC_SUB_CANCEL", TIPC_SUB_CANCEL); XXX This var is missing on gcc (GCC) 4.1.1 (Gentoo 4.1.1) and it breaks the build */
+#ifdef TIPC_SUB_CANCEL
+ /* doesn't seem to be available everywhere */
+ PyModule_AddIntConstant(m, "TIPC_SUB_CANCEL", TIPC_SUB_CANCEL);
+#endif
PyModule_AddIntConstant(m, "TIPC_WAIT_FOREVER", TIPC_WAIT_FOREVER);
PyModule_AddIntConstant(m, "TIPC_PUBLISHED", TIPC_PUBLISHED);
PyModule_AddIntConstant(m, "TIPC_WITHDRAWN", TIPC_WITHDRAWN);