|
Bugzilla – Full Text Bug Listing |
| Summary: | configure fails to detect getaddrinfo() on Tru64 v5.1 | ||
|---|---|---|---|
| Product: | Sudo | Reporter: | Daniel Richard G. <skunk> |
| Component: | Configure | Assignee: | Todd C. Miller <Todd.Miller> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | low | ||
| Version: | 1.8.7 | ||
| Hardware: | Alpha | ||
| OS: | Tru64 UNIX | ||
I've checked in a dedicated check for getaddrifo() that should address this. And it does, sure enough. Sudo now builds (and tests) cleanly on Tru64 v5.1. Thank you for the fix! |
Tru64 v5.1 has getaddrinfo(), but not in the form most systems have it. From /usr/include/netdb.h: #if defined (_SOCKADDR_LEN) || defined (_XOPEN_SOURCE_EXTENDED) #define getaddrinfo ngetaddrinfo #else #define getaddrinfo ogetaddrinfo #endif The configure script only looks for the library symbol, so it doesn't find the function (Sudo hg tip here): checking for getaddrinfo... no checking for getaddrinfo in -lsocket... no checking for getaddrinfo in -linet... no checking for getaddrinfo in -lsocket -lnsl... no It thus enables building compat/getaddrinfo.c, which fails due to conflicting definitions: libtool: compile: cc -c -I../../include -I.. -I../.. -D__STDC_WANT_LIB_EXT1__=1 -std1 -warnprotos -readonly_strings -fast -O4 ../../compat/getaddrinfo.c -DPIC -o .libs/getaddrinfo.o [several warnings about redefined cpp symbols] cc: Error: ../../compat/getaddrinfo.h, line 36: In this declaration, the struct "addrinfo" is redefined. (redefstruct) struct addrinfo { ^ cc: Error: ../../compat/getaddrinfo.h, line 72: In this declaration, the type of "gai_strerror" is not compatible with the type of a previous declaration of "gai_strerror" at line number 293 in file /usr/include/netdb.h. (notcompat) const char *gai_strerror(int ecode); ------------^ [...] If I manually edit config.h so that HAVE_GETADDRINFO is #defined, then the build succeeds. It would probably make sense to check for getaddrinfo() using AC_LINK_IFELSE() instead of AC_CHECK_FUNCS(), but the concomitant usage of SUDO_CHECK_LIB() makes the solution less than straightforward.