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 <1317999333.3.0.767104636054.issue10141@psf.upfronthosting.co.za>
In-reply-to
Content
I added the line in the suggested place:

#ifdef HAVE_LINUX_TIPC_H
# include <linux/tipc.h>
#endif

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

#ifdef HAVE_LINUX_CAN_RAW_H
#include <linux/can/raw.h>
#endif

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:

https://gist.github.com/1270436

Tell me I'm not going mad!
History
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: <1317999333.3.0.767104636054.issue10141@psf.upfronthosting.co.za>
2011-10-07 14:55:32vinay.sajiplinkissue10141 messages
2011-10-07 14:55:32vinay.sajipcreate