Re: msys inet_pton strangeness - Mailing list pgsql-hackers

From Tom Lane
Subject Re: msys inet_pton strangeness
Date
Msg-id 841268.1727538546@sss.pgh.pa.us
Whole thread Raw
In response to msys inet_pton strangeness  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: msys inet_pton strangeness
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> It's complaining like this:

> C:/tools/xmsys64/home/pgrunner/bf/root/REL_15_STABLE/pgsql/src/interfaces/libpq/fe-secure-common.c:219:21: error:
implicitdeclaration of function 'inet_pton'; did you mean 'inet_aton'? [-Wimplicit-function-declaration] 
>    219 |                 if (inet_pton(AF_INET6, host, &addr) == 1)
>        |                     ^~~~~~~~~

> configure has determined that we have inet_pton, and I have repeated the
> test manually.

configure's test is purely a linker test.  It does not check to see
where/whether the function is declared.  Meanwhile, the compiler is
complaining that it doesn't see a declaration.  So the problem
probably can be fixed by adding an #include, but you'll need to
figure out what.

I see that our other user of inet_pton, fe-secure-openssl.c,
has a rather different #include setup than fe-secure-common.c;
does it compile OK?

            regards, tom lane



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: msys inet_pton strangeness
Next
From: Sutou Kouhei
Date:
Subject: Re: Make COPY format extendable: Extract COPY TO format implementations