* "Chuck Lever" <chuck.lever@xxxxxxxxxx>: | > make[2]: Entering directory | > `/home/gzp/src/nfs-utils-1.1.3/utils/mount' | > gcc -DHAVE_CONFIG_H -I. -I../../support/include | > -I../../support/include -D_GNU_SOURCE -Wall -Wstrict-prototypes -pipe | > -g -O2 -MT network.o -MD -MP -MF .deps/network.Tpo -c -o network.o network.c | > network.c: In function 'nfs_name_to_address': | > network.c:154: error: 'AI_ADDRCONFIG' undeclared (first use in this function) | > network.c:154: error: (Each undeclared identifier is reported only once | > network.c:154: error: for each function it appears in.) | > network.c:160: error: 'AI_V4MAPPED' undeclared (first use in this function) | > network.c:160: error: 'AI_ALL' undeclared (first use in this function) | > make[2]: *** [network.o] Error 1 | > make[2]: Leaving directory `/home/gzp/src/nfs-utils-1.1.3/utils/mount' | > | > 1.1.2 compiles fine. | Can you tell me what distribution you are using? No distro. | In my distribution (Fedora), these macros, along with getaddrinfo(3), | are defined in /usr/include/netdb.h. utils/mount/network.c appears to | include this file directly, so I am still puzzled by this. I'll attach the glibc 2.2.5 netdb.h, and grep AI_ in /usr/include returns only this: $ grep AI_ * netdb.h:# define GAI_WAIT 0 netdb.h:# define GAI_NOWAIT 1 netdb.h:# define AI_PASSIVE 0x0001 /* Socket address is intended for `bind'. */ netdb.h:# define AI_CANONNAME 0x0002 /* Request for canonical name. */ netdb.h:# define AI_NUMERICHOST 0x0004 /* Don't use name resolution. */ netdb.h:# define EAI_BADFLAGS -1 /* Invalid value for `ai_flags' field. */ netdb.h:# define EAI_NONAME -2 /* NAME or SERVICE is unknown. */ netdb.h:# define EAI_AGAIN -3 /* Temporary failure in name resolution. */ netdb.h:# define EAI_FAIL -4 /* Non-recoverable failure in name res. */ netdb.h:# define EAI_NODATA -5 /* No address associated with NAME. */ netdb.h:# define EAI_FAMILY -6 /* `ai_family' not supported. */ netdb.h:# define EAI_SOCKTYPE -7 /* `ai_socktype' not supported. */ netdb.h:# define EAI_SERVICE -8 /* SERVICE not supported for `ai_socktype'. */ netdb.h:# define EAI_ADDRFAMILY -9 /* Address family for NAME no tsupported. */ netdb.h:# define EAI_MEMORY -10 /* Memory allocation failure. */ netdb.h:# define EAI_SYSTEM -11 /* System error returned in `errno'. */ netdb.h:# define EAI_INPROGRESS -100 /* Processing request in progress. */ netdb.h:# define EAI_CANCELED -101 /* Request canceled. */ netdb.h:# define EAI_NOTCANCELED -102 /* Request not canceled. */ netdb.h:# define EAI_ALLDONE -103 /* All requests done. */ netdb.h:# define EAI_INTR -104 /* Interrupted by a signal. */ netdb.h:/* Enqueue ENT requests from the LIST. If MODE is GAI_WAIT wait until all netdb.h: requests are handled. If WAIT is GAI_NOWAIT return immediately after
Attachment:
netdb.h
Description: Binary data