diff Modules/socketmodule.c @ 72807:d4ce850b06b7

Issue #10141: fix socketmodule compilation on Linux systems with <linux/can.h> but without AF_CAN definition.
author Charles-François Natali <neologix@free.fr>
date Fri, 07 Oct 2011 22:47:08 +0200
parents e767318baccd
children 5e33219492bc
line wrap: on
line diff
--- a/Modules/socketmodule.c	Fri Oct 07 15:26:54 2011 -0400
+++ b/Modules/socketmodule.c	Fri Oct 07 22:47:08 2011 +0200
@@ -1220,7 +1220,7 @@
     }
 #endif
 
-#ifdef HAVE_LINUX_CAN_H
+#ifdef AF_CAN
     case AF_CAN:
     {
         struct sockaddr_can *a = (struct sockaddr_can *)addr;
@@ -1606,7 +1606,7 @@
     }
 #endif
 
-#ifdef HAVE_LINUX_CAN_H
+#ifdef AF_CAN
     case AF_CAN:
         switch (s->sock_proto) {
         case CAN_RAW:
@@ -1746,7 +1746,7 @@
     }
 #endif
 
-#ifdef HAVE_LINUX_CAN_H
+#ifdef AF_CAN
     case AF_CAN:
     {
         *len_ret = sizeof (struct sockaddr_can);