This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vinay.sajip
Recipients amaury.forgeotdarc, giampaolo.rodola, mluis, neologix, ogait87, orsenthil, pitrou, python-dev, rosslagerwall, slanden, vinay.sajip, vstinner
Date 2011-10-07.14:55:32
SpamBayes Score 2.2664879e-05
Marked as misclassified No
Message-id <>
I added the line in the suggested place:

# include <linux/tipc.h>

#include <linux/socket.h>  /* the line I added - line 76 */
#include <linux/can.h>

#include <linux/can/raw.h>

Strangely, it seems to make no difference! I copied out the actual gcc line from the make file and ran it from the command line to just pre-process:

gcc -pthread -fPIC -g -O0 -Wall -Wstrict-prototypes -IInclude -I. -I./Include -I/usr/local/include -I/home/vinay/projects/python/default -E /home/vinay/projects/python/default/Modules/socketmodule.c >/tmp/tmp.c

(I assume /usr/include is always searched, as it's not explicitly named in a -I parameter.)

Looking at the tmp.c file produced, here's the relevant section:

# 182 "/usr/include/linux/tipc.h" 3 4
struct sockaddr_tipc {
 unsigned short family;
 unsigned char addrtype;
 signed char scope;
 union {
  struct tipc_portid id;
  struct tipc_name_seq nameseq;
  struct {
   struct tipc_name name;
   __u32 domain;
  } name;
 } addr;
# 73 "/home/vinay/projects/python/default/Modules/socketmodule.h" 2

# 1 "/usr/include/linux/can.h" 1 3 4

After the tipc.h include, the can.h include comes next, as if I hadn't added the linux/socket.h line at all! What is this I don't even ...

I pasted the whole socketmodule.h file to a gist here:

Tell me I'm not going mad!
Date User Action Args
2011-10-07 14:55:33vinay.sajipsetrecipients: + vinay.sajip, amaury.forgeotdarc, orsenthil, pitrou, vstinner, giampaolo.rodola, neologix, slanden, rosslagerwall, python-dev, ogait87, mluis
2011-10-07 14:55:33vinay.sajipsetmessageid: <>
2011-10-07 14:55:32vinay.sajiplinkissue10141 messages
2011-10-07 14:55:32vinay.sajipcreate