9 Aug 2001 jum   » (Master)

Found out why the Tru64 build was broken for quite a while. We recently switched compiler -D switches to _XOPEN_SOURCE=500. From looking at sys/socket.t this looked like it implies -D_SOCKADDR_LEN, so our main machine.h file defined HAS_SALEN for this architecture. The HAS_SALEN define means that this machine uses variable length struct sockaddr's, and thus one has to do extra voodoo to handle the struct ifreq array returned by SIOCGIFCONF. As I just found out the sys/ioctl.h file does not bother looking at _XOPEN_SOURCE and thus defined SIOCGIFCONF to the old version with fixed length structures. The sa_len member of each structure remains set in this case, and this made my code stumble across unaligned accesses. Turning on -D_SOCKADDR_LEN on the command line fixes that and all runs fine again.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!