[Python-checkins] cpython: Issue #10141: fix socketmodule compilation on Linux systems with <linux/can.h>

charles-francois.natali python-checkins at python.org
Fri Oct 7 22:44:49 CEST 2011


http://hg.python.org/cpython/rev/d4ce850b06b7
changeset:   72807:d4ce850b06b7
user:        Charles-François Natali <neologix at free.fr>
date:        Fri Oct 07 22:47:08 2011 +0200
summary:
  Issue #10141: fix socketmodule compilation on Linux systems with <linux/can.h>
but without AF_CAN definition.

files:
  Modules/socketmodule.c |  6 +++---
  1 files changed, 3 insertions(+), 3 deletions(-)


diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -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);

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list