Bug 132 - NSD fails to compile when --disable-ipv6 is used on configure
NSD fails to compile when --disable-ipv6 is used on configure
Status: RESOLVED FIXED
Product: NSD
Classification: Unclassified
Component: NSD Code
2.3.x
i386 Linux
: P3 minor
Assigned To: NSD team
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-03 20:01 CEST by Alex Lee
Modified: 2006-05-03 20:11 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Lee 2006-05-03 20:01:33 CEST
====
....
 -fmove-all-movables -fmerge-all-constants -mmmx -msse2 -c dbcreate.c -o dbcreate.o
server.c: In function `handle_tcp_reading':
server.c:915: error: structure has no member named `ss_family'
server.c:917: error: structure has no member named `ss_family'
make: *** [server.o] Error 1
....
====
Configure line:
./configure --prefix=/usr --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --with-user=nsd --disable-root-server --disable-ipv6 --disable-plugins --disable-checking --disable-bind8-stats --disable-mmap --disable-nsid --with-ssl --libdir=/usr/lib64 --build=x86_64-pc-linux-gnu

Glibc: glibc-2.4-r1

The problem is with the code:

  if (data->query->addr.ss_family == AF_INET) {
    STATUP(data->nsd, ctcp);
  } else if (data->query->addr.ss_family == AF_INET6) {
    STATUP(data->nsd, ctcp6);
  }

where if INET6 is not defined, there won't be the member ss_family since IPv4 is sin_family. So I guess maybe it's missing the #if defined(INET6) checks.
Comment 1 Miek Gieben 2006-05-03 20:11:59 CEST
Your guess is right. branches/NSD_2_2 in our subversion tree already has
the #ifdefs.

As a work around you can just compile with --enable-ipv6.