summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.h
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-11-09 16:00:38 (GMT)
committerGitHub <noreply@github.com>2017-11-09 16:00:38 (GMT)
commitd3187158c09cf899e9849f335bdff10594209167 (patch)
tree0663f87effd4b2aae80fcd0421a74a5f071985db /Modules/socketmodule.h
parent0a2ff23fe6efb1653d655ac19d0a4e1629fd8d95 (diff)
downloadcpython-d3187158c09cf899e9849f335bdff10594209167.zip
cpython-d3187158c09cf899e9849f335bdff10594209167.tar.gz
cpython-d3187158c09cf899e9849f335bdff10594209167.tar.bz2
bpo-31927: Fix bugs in socketmodule.c on NetBSD and other issues. (#4235)
* Fix compilation of the socket module on NetBSD 8. * Fix the assertion failure or reading arbitrary data when parse a AF_BLUETOOTH address on NetBSD and DragonFly BSD. * Fix other potential errors and make the code more reliable.
Diffstat (limited to 'Modules/socketmodule.h')
-rw-r--r--Modules/socketmodule.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/socketmodule.h b/Modules/socketmodule.h
index e0d50df..fdb4e87 100644
--- a/Modules/socketmodule.h
+++ b/Modules/socketmodule.h
@@ -80,7 +80,10 @@ typedef int socklen_t;
#endif
#ifdef HAVE_LINUX_CAN_H
-#include <linux/can.h>
+# include <linux/can.h>
+#else
+# undef AF_CAN
+# undef PF_CAN
#endif
#ifdef HAVE_LINUX_CAN_RAW_H