Issue #10141: updated new usages of AF_CAN to be in #ifdef AF_CAN rather than #ifdef HAVE_LINUX_CAN_H to allow compilation on older Linuxes.
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index a1e5da8..7add6b6 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -1165,7 +1165,7 @@
}
#endif
-#ifdef HAVE_LINUX_CAN_H
+#ifdef AF_CAN
case AF_CAN:
{
struct sockaddr_can *a = (struct sockaddr_can *)addr;
@@ -1589,7 +1589,7 @@
}
#endif
-#ifdef HAVE_LINUX_CAN_H
+#ifdef AF_CAN
case AF_CAN:
switch (s->sock_proto) {
case CAN_RAW:
@@ -1796,7 +1796,7 @@
}
#endif
-#ifdef HAVE_LINUX_CAN_H
+#ifdef AF_CAN
case AF_CAN:
{
*len_ret = sizeof (struct sockaddr_can);