On Mon, Aug 11, 2014 at 11:02:48AM -0700, Jeff Janes wrote: > While trying to test more recent stuff against mingw, I kept running into a > problem which bisected down to this (a16bac36eca8158cbf78987e953).
> This is the warning/error I get: > > auth.c: In function 'ClientAuthentication': > auth.c:458:6: warning: implicit declaration of function 'gai_strerror' > [-Wimplicit-function-declaration] > libpq/auth.o:auth.c:(.text+0x1949): undefined reference to `gai_strerror' > libpq/auth.o:auth.c:(.text+0x19c4): undefined reference to `gai_strerror' > libpq/auth.o:auth.c:(.text+0x1b1a): undefined reference to `gai_strerror' > libpq/auth.o:auth.c:(.text+0x1cb4): undefined reference to `gai_strerror' > libpq/auth.o:auth.c:(.text+0x1cdc): undefined reference to `gai_strerror' > Any suggestions on what to try? This patch doesn't seem to explicitly > mention gai_strerror at all, so it must be some indirect effect. I, too, encountered that. The patch let "configure" detect HAVE_GETADDRINFO under MinGW-w64; passing "ac_cv_func_getaddrinfo=no" on the configure command line is a workaround. Under !HAVE_GETADDRINFO, "configure" arranges to build src/port/getaddrinfo.c, and src/include/getaddrinfo.h injects the replacement gai_strerror() prototype. That understandably doesn't happen in a HAVE_GETADDRINFO build, yet src/include/port/win32/sys/socket.h does the following unconditionally: /* * we can't use the windows gai_strerror{AW} functions because * they are defined inline in the MS header files. So we'll use our * own */ #undef gai_strerror Somehow or other, we must bring these parts into agreement. -- Noah Misch EnterpriseDB http://www.enterprisedb.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers