On Mon, May 02, 2011 at 12:07:30PM +0200, Alan T DeKok wrote: > Josip Rodin wrote: > > The first test works, but the second doesn't. The second one should actually > > work, but the problem is in the definition: > > C compilers now have built-in "offsetof" to fix precisely this problem. > > See the attached patch. You'll have to re-run "autoconf" to > re-generate the "configure" script.
Hrm, no luck: configure:24780: checking for ipi6_addr in struct in6_pktinfo configure:24813: gcc -c -g -O2 -O2 -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS conftest.c >&5 conftest.c: In function 'main': conftest.c:118: error: invalid use of undefined type 'struct in6_pktinfo' configure:24819: $? = 1 configure: failed program was: [...] | #define HAVE_STDDEF_H 1 [...] | #include <netinet/in.h> | #ifdef HAVE_STDDEF_H | #include <stddef.h> | #endif | #ifndef offsetof | #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER) | #endif | | int | main () | { | int foo = offsetof(struct in6_pktinfo, ipi6_addr) | ; | return 0; | } configure:24840: result: no It's definitely using the system offsetof(3), but it's not working. It's like #include <netinet/in.h> did nothing...?! -- 2. That which causes joy or happiness. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org