Bugzilla – Bug 645
Unbound 1.5.2 fails to compile on Solaris 10
Last modified: 2015-02-20 15:12:52 CET
Unbound 1.5.2 fails to compile on Solaris 10 on "services/listen_dnsport.c:612" bash-3.00# make ./libtool --tag=CC --mode=compile gcc -I. -I/usr/local/ssl/include -I/usr/sfw/include -g -O2 -std=c99 -D_REENTRANT -pthreads -o listen_dnsport.lo -c services/listen_dnsport.c libtool: compile: gcc -I. -I/usr/local/ssl/include -I/usr/sfw/include -g -O2 -std=c99 -D_REENTRANT -pthreads -c services/listen_dnsport.c -fPIC -DPIC -o .libs/listen_dnsport.o services/listen_dnsport.c: In function `create_local_accept_sock': services/listen_dnsport.c:612: error: `PF_LOCAL' undeclared (first use in this function) services/listen_dnsport.c:612: error: (Each undeclared identifier is reported only once services/listen_dnsport.c:612: error: for each function it appears in.) make: *** [listen_dnsport.lo] Error 1 Fix: There is PF_UNIX defined, so I suggest to add in services/listen_dnsport.c the following lines: #ifndef PF_LOCAL #define PF_LOCAL PF_UNIX #endif or simply substitute everywhere PF_LOCAL by PF_UNIX which is POSIX name for PF_LOCAL. -- Carsten
Hi Carsten, The issue is the PF_UNIX and PF_LOCAL values. AF_LOCAL works as well, is suggested by manual pages and header files on Linux and BSD, and seems to be more portable. I'll change that PF_LOCAL into AF_LOCAL. Does that work for you? Best regards, Wouter
Hi Wouter, thanks for changing the code. AF_LOCAL should work as well. Have a good weekend Carsten
Hi Carsten, Ok good, because there are systems where PF_LOCAL|UNIX fail ... Lots of portability issues around unix sockets... (like, does not work on certain Apple filesystems, but does work in /tmp on OSX). Have a nice weekend too! Best regards, Wouter