summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.h
diff options
context:
space:
mode:
authorThomas Klausner <tk@giga.or.at>2022-01-21 07:44:05 (GMT)
committerGitHub <noreply@github.com>2022-01-21 07:44:05 (GMT)
commit40fcd16889028bd3cd2289e0f8a2af43f17a5824 (patch)
tree887af34099e0520f5908c69431ef187cd9895241 /Modules/socketmodule.h
parentcfadcc31ea84617b1c73022ce54d4ae831333e8d (diff)
downloadcpython-40fcd16889028bd3cd2289e0f8a2af43f17a5824.zip
cpython-40fcd16889028bd3cd2289e0f8a2af43f17a5824.tar.gz
cpython-40fcd16889028bd3cd2289e0f8a2af43f17a5824.tar.bz2
bpo-30512: Add CAN Socket support for NetBSD (GH-30066)
Diffstat (limited to 'Modules/socketmodule.h')
-rw-r--r--Modules/socketmodule.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/socketmodule.h b/Modules/socketmodule.h
index aea599f..db26c04 100644
--- a/Modules/socketmodule.h
+++ b/Modules/socketmodule.h
@@ -129,6 +129,8 @@ typedef int socklen_t;
#ifdef HAVE_LINUX_CAN_H
# include <linux/can.h>
+#elif defined(HAVE_NETCAN_CAN_H)
+# include <netcan/can.h>
#else
# undef AF_CAN
# undef PF_CAN
@@ -253,7 +255,7 @@ typedef union sock_addr {
#ifdef HAVE_NETPACKET_PACKET_H
struct sockaddr_ll ll;
#endif
-#ifdef HAVE_LINUX_CAN_H
+#if defined(HAVE_LINUX_CAN_H) || defined(HAVE_NETCAN_CAN_H)
struct sockaddr_can can;
#endif
#ifdef HAVE_SYS_KERN_CONTROL_H