diff options
author | Thomas Klausner <tk@giga.or.at> | 2022-01-21 07:44:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-21 07:44:05 (GMT) |
commit | 40fcd16889028bd3cd2289e0f8a2af43f17a5824 (patch) | |
tree | 887af34099e0520f5908c69431ef187cd9895241 /Modules/socketmodule.c | |
parent | cfadcc31ea84617b1c73022ce54d4ae831333e8d (diff) | |
download | cpython-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.c')
-rw-r--r-- | Modules/socketmodule.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 0e27563..1c8ef1e 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -7703,7 +7703,7 @@ PyInit__socket(void) PyModule_AddIntMacro(m, SOL_CAN_RAW); PyModule_AddIntMacro(m, CAN_RAW); #endif -#ifdef HAVE_LINUX_CAN_H +#if defined(HAVE_LINUX_CAN_H) || defined(HAVE_NETCAN_CAN_H) PyModule_AddIntMacro(m, CAN_EFF_FLAG); PyModule_AddIntMacro(m, CAN_RTR_FLAG); PyModule_AddIntMacro(m, CAN_ERR_FLAG); @@ -7718,9 +7718,11 @@ PyInit__socket(void) PyModule_AddIntMacro(m, CAN_J1939); #endif #endif -#ifdef HAVE_LINUX_CAN_RAW_H +#if defined(HAVE_LINUX_CAN_RAW_H) || defined(HAVE_NETCAN_CAN_H) PyModule_AddIntMacro(m, CAN_RAW_FILTER); +#ifdef CAN_RAW_ERR_FILTER PyModule_AddIntMacro(m, CAN_RAW_ERR_FILTER); +#endif PyModule_AddIntMacro(m, CAN_RAW_LOOPBACK); PyModule_AddIntMacro(m, CAN_RAW_RECV_OWN_MSGS); #endif |