Issue #20065: socketmodule: Fix build error when AF_CAN is defined without the
proper CAN headers.
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 8c8b08e..32b4eba 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -1226,7 +1226,7 @@
}
#endif
-#ifdef AF_CAN
+#ifdef HAVE_LINUX_CAN_H
case AF_CAN:
{
struct sockaddr_can *a = (struct sockaddr_can *)addr;
@@ -1654,7 +1654,7 @@
}
#endif
-#ifdef AF_CAN
+#ifdef HAVE_LINUX_CAN_H
case AF_CAN:
switch (s->sock_proto) {
case CAN_RAW:
@@ -1859,7 +1859,7 @@
}
#endif
-#ifdef AF_CAN
+#ifdef HAVE_LINUX_CAN_H
case AF_CAN:
{
*len_ret = sizeof (struct sockaddr_can);