NLnetLabs / ldns

LDNS is a DNS library that facilitates DNS tool programming

Home Page:https://nlnetlabs.nl/ldns

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Solaris and error: conflicting types for 'inet_ntop'

noloader opened this issue · comments

Hi Everyone.

I'm updating OpenSSH on my Solaris 11.4 i86pc box. LDNS is a dependency. LDNS 1.8.1 has a small issue with inet_ntop:

$ make
...
./libtool --tag=CC --quiet --mode=compile /bin/gcc -I. -I. -I/opt/ssh/include -D
NDEBUG -DHAVE_CONFIG_H -DLDNS_TRUST_ANCHOR_FILE="\"/opt/ssh/etc/unbound/dnsrootk
ey.pem\"" -fno-strict-aliasing -Wunused-function -Wstrict-prototypes -Wwrite-str
ings -W -Wall -g2 -O2 -m64 -march=native -fPIC -pthread -I/opt/ssh/include -c ./
buffer.c -o buffer.lo
In file included from ./buffer.c:10:0:
./ldns/config.h:675:13: error: conflicting types for 'inet_ntop'
 const char *inet_ntop(int af, const void *src, char *dst, size_t size);
             ^
In file included from ./ldns/config.h:588:0,
                 from ./buffer.c:10:
/usr/include/arpa/inet.h:43:20: note: previous declaration of 'inet_ntop' was he
re
 extern const char *inet_ntop(int, const void *_RESTRICT_KYWD,
                    ^
*** Error code 1
make: Fatal error: Command failed for target `buffer.lo'

In this case, I think LDNS has a declaration for inet_ntop, so there is no need to provide one.

Also see GH #154.

Adding this to configure got past the compile error.

./configure \
    ac_cv_func_inet_pton=yes \
    ac_cv_func_inet_ntop=yes \
    ...

I suspect the Autotools test failed because of a missing libnsl during the configure test. Also see GH #154 and GH #155.

It looks like this issue was fixed at Commit f88a75f7159e.

Ok to close?

Yep! Thanks, it is fixed and in changelog, so closing