Hello, The following happens on NetBSD 5.0:
--8<---------------cut here---------------start------------->8--- configure: checking how to do getaddrinfo, freeaddrinfo and getnameinfo checking for library containing getaddrinfo... none required checking for getaddrinfo... yes checking for gai_strerror (possibly via ws2tcpip.h)... yes checking for struct sockaddr.sa_len... yes checking whether getaddrinfo is declared... yes checking whether freeaddrinfo is declared... yes checking whether gai_strerror is declared... yes checking whether getnameinfo is declared... yes checking for struct addrinfo... yes [...] gcc -std=gnu99 -DHAVE_CONFIG_H -DBUILDING_LIBGUILE=1 -I.. -I.. -I../lib -I../lib -I/usr/pkg/include -I/usr/pkg/include -I/usr/y0/include -Wall -Wmissing-prototypes -Wdeclaration-after-statement -Wundef -Wswitch-enum -fvisibility=hidden -I/usr/pkg/include -g -O2 -MT net_db.lo -MD -MP -MF .deps/net_db.Tpo -c net_db.c -fPIC -DPIC -o .libs/net_db.o In file included from net_db.c:36: ../libguile/_scm.h:122:27: warning: "HAVE_STAT64" is not defined net_db.c:460: error: 'AI_ALL' undeclared here (not in a function) net_db.c:460: error: bit-field 'verify_error_if_negative_size__' width not an integer constant In file included from net_db.c:750: ../libguile/net_db.x: In function 'scm_init_net_db': ../libguile/net_db.x:19: error: 'AI_V4MAPPED' undeclared (first use in this function) ../libguile/net_db.x:19: error: (Each undeclared identifier is reported only once ../libguile/net_db.x:19: error: for each function it appears in.) ../libguile/net_db.x:21: error: 'AI_ADDRCONFIG' undeclared (first use in this function) gmake[3]: *** [net_db.lo] Error 1 --8<---------------cut here---------------end--------------->8--- Gnulib’s netdb.in.h does have: --8<---------------cut here---------------start------------->8--- # ifndef AI_V4MAPPED # define AI_V4MAPPED 0 /* 0x0008: IPv4 mapped addresses are acceptable. */ # endif # ifndef AI_ALL # define AI_ALL 0 /* 0x0010: Return IPv4 mapped and IPv6 addresses. */ # endif --8<---------------cut here---------------end--------------->8--- but these are within “#if @gnulib_getaddri...@” and AFAICS @GNULIB_GETADDRINFO@ is always zero. I would suggest simply leaving out “#if @gnulib_getaddri...@” and removing it from ‘gl_NETDB_H_DEFAULTS’. What do you think? Thanks, Ludo’.