pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: pkgsrc/net/nsd



Hi,

Thanks for your feedbacks.

Greg Troxel <gdt%lexort.com@localhost> writes:

> Roland Illig <roland.illig%gmx.de@localhost> writes:
>
>> On 30.05.2020 10:45, Ryo ONODERA wrote:
>>> Module Name:        pkgsrc
>>> Committed By:       ryoon
>>> Date:               Sat May 30 08:45:58 UTC 2020
>>>
>>> Modified Files:
>>>     pkgsrc/net/nsd: Makefile
>>>
>>> Log Message:
>>> nsd: Some library functions require _NETBSD_SOURCE on NetBSD
>>
>> Which library functions are this? On 2020-05-06, I built nsd-4.3.1 on
>> NetBSD-8.0-x86_64 without any additional compiler flags.
>
> Also, I tend to find a desire to define _NETBSD_SOURCE to be a clue that
> upstream is defining some other visibility define incorrectly.
> Visibility defines are mostly used to restrict visibility to things
> defined in a particular standard, and a program that defines one and
> then expects something not in that standard is buggy.

I have build failure under NetBSD/amd64 9.99.64 of 2020-05-29.

With this patch:
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/net/nsd/Makefile,v
retrieving revision 1.112
diff -u -r1.112 Makefile
--- Makefile    30 May 2020 08:45:58 -0000      1.112
+++ Makefile    30 May 2020 11:25:47 -0000
@@ -21,11 +21,6 @@
 USE_LANGUAGES= c c++
 USE_LIBTOOL=   yes
 
-.if ${OPSYS} == "NetBSD"
-# Some _NETBSD_SOURCE definitions are required to build.
-CPPFLAGS+=     -D_NETBSD_SOURCE
-.endif
-
 GNU_CONFIGURE= yes
 
 PKG_SYSCONFSUBDIR=     nsd

I have the following build failure.

ryoon@brownie: /usr/pkgsrc/net/nsd
$ make
=> Lock /usr/tmp/pkgsrc/net/nsd/work/.lockfile acquired for ``bootstrap-depends'' on behalf of process 23645
=> Bootstrap dependency digest>=20010302: found digest-20190127
=> Lock /usr/tmp/pkgsrc/net/nsd/work/.lockfile released for ``bootstrap-depends'' on behalf of process 23645
===> Skipping vulnerability checks.
WARNING: No /var/db/pkg/pkg-vulnerabilities file found.
WARNING: To fix run: `/usr/sbin/pkg_admin -K /var/db/pkg fetch-pkg-vulnerabilities'.
=> Checksum SHA1 OK for nsd-4.3.1.tar.gz
=> Checksum RMD160 OK for nsd-4.3.1.tar.gz
=> Checksum SHA512 OK for nsd-4.3.1.tar.gz
=> Lock /usr/tmp/pkgsrc/net/nsd/work/.lockfile acquired for ``depends'' on behalf of process 23645
===> Installing dependencies for nsd-4.3.1
==========================================================================
The supported build options for nsd are:

        inet6 rrl

The currently selected options are:

        inet6

You can select which build options to use by setting PKG_DEFAULT_OPTIONS
or the following variable.  Its current value is shown:

        PKG_OPTIONS.nsd (not defined)

==========================================================================
==========================================================================
The following variables will affect the build process of this package,
nsd-4.3.1.  Their current value is shown below:

        * NSD_GROUP = nsd
        * NSD_USER = nsd
        * SSLBASE = /usr
        * SSLCERTS = /etc/openssl/certs
        * SSLDIR = /etc/openssl
        * SSLKEYS = /etc/openssl/private
        * VARBASE = /var

You may want to abort the process now with CTRL-C and change their value
before continuing.  Be sure to run `/usr/bin/make clean' after
the changes.
==========================================================================
=> Tool dependency libtool-base>=2.4.2nb9: found libtool-base-2.4.6nb2
=> Tool dependency checkperms>=1.1: found checkperms-1.12
=> Build dependency cwrappers>=20150314: found cwrappers-20180325
=> Lock /usr/tmp/pkgsrc/net/nsd/work/.lockfile released for ``depends'' on behalf of process 23645
===> Invoking ``all'' after barrier for nsd-4.3.1
===> Skipping vulnerability checks.
WARNING: No /var/db/pkg/pkg-vulnerabilities file found.
WARNING: To fix run: `/usr/sbin/pkg_admin -K /var/db/pkg fetch-pkg-vulnerabilities'.
=> Lock /usr/tmp/pkgsrc/net/nsd/work/.lockfile acquired for ``tools'' on behalf of process 21886
===> Overriding tools for nsd-4.3.1
=> Lock /usr/tmp/pkgsrc/net/nsd/work/.lockfile released for ``tools'' on behalf of process 21886
=> Lock /usr/tmp/pkgsrc/net/nsd/work/.lockfile acquired for ``extract'' on behalf of process 21886
===> Extracting for nsd-4.3.1
=> Lock /usr/tmp/pkgsrc/net/nsd/work/.lockfile released for ``extract'' on behalf of process 21886
=> Lock /usr/tmp/pkgsrc/net/nsd/work/.lockfile acquired for ``patch'' on behalf of process 21886
===> Patching for nsd-4.3.1
=> Applying pkgsrc patches for nsd-4.3.1
=> Verifying /usr/pkgsrc/net/nsd/patches/patch-aa
=> Applying pkgsrc patch /usr/pkgsrc/net/nsd/patches/patch-aa
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|$NetBSD: patch-aa,v 1.14 2014/09/27 20:11:38 pettai Exp $
|
|Install nsd.conf.sample in examples directory
|
|--- Makefile.in.orig   2014-08-29 06:24:27.000000000 +0000
|+++ Makefile.in
--------------------------
Patching file Makefile.in using Plan A...
Hunk #1 succeeded at 140 (offset 8 lines).
done
=> Lock /usr/tmp/pkgsrc/net/nsd/work/.lockfile released for ``patch'' on behalf of process 21886
=> Lock /usr/tmp/pkgsrc/net/nsd/work/.lockfile acquired for ``wrapper'' on behalf of process 21886
===> Creating toolchain wrappers for nsd-4.3.1
=> Lock /usr/tmp/pkgsrc/net/nsd/work/.lockfile released for ``wrapper'' on behalf of process 21886
=> Lock /usr/tmp/pkgsrc/net/nsd/work/.lockfile acquired for ``configure'' on behalf of process 21886
===> Configuring for nsd-4.3.1
=> Modifying GNU configure scripts to avoid --recheck
=> Replacing config-guess with pkgsrc versions
=> Replacing config-sub with pkgsrc versions
=> Replacing install-sh with pkgsrc version
=> Checking for portability problems in extracted files
checking for x86_64--netbsd-gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for egrep... (cached) /usr/bin/egrep
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for x86_64--netbsd-gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... /usr/bin/awk
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for egrep... (cached) /usr/bin/egrep
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... -lfl
checking whether yytext is a pointer... yes
checking for bison... bison -y
checking whether ln -s works... yes
checking for a BSD-compatible install... /usr/bin/install -c -o ryoon -g users
checking whether lex accepts -i... yes
checking if lex defines yy_current_buffer... no
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for uid_t in sys/types.h... yes
checking for pid_t... yes
checking for size_t... yes
checking for off_t... yes
checking whether the C compiler (gcc) accepts the "format" attribute... yes
checking whether the C compiler (gcc) accepts the "unused" attribute... yes
checking whether the C compiler (gcc) accepts the "noreturn" attribute... yes
checking if memcmp compares unsigned... yes
checking whether ctime_r works with two arguments... yes
checking for libevent... found in /usr
checking for library containing clock_gettime... none required
checking for event.h... yes
checking whether EV_VERSION_MAJOR is declared... no
checking for library containing event_set... -levent
checking for event_base_free... yes
checking for event_base_once... yes
checking for event_base_new... yes
checking for event_base_get_method... yes
checking for ev_loop... no
checking for ev_default_loop... no
checking for ANSI C header files... (cached) yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking netinet/tcp.h usability... yes
checking netinet/tcp.h presence... yes
checking for netinet/tcp.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for unistd.h... (cached) yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking for stdint.h... (cached) yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking sys/bitypes.h usability... no
checking sys/bitypes.h presence... no
checking for sys/bitypes.h... no
checking tcpd.h usability... yes
checking tcpd.h presence... yes
checking for tcpd.h... yes
checking glob.h usability... yes
checking glob.h presence... yes
checking for glob.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking endian.h usability... yes
checking endian.h presence... yes
checking for endian.h... yes
checking sys/random.h usability... no
checking sys/random.h presence... no
checking for sys/random.h... no
checking for double definition of struct va_list... no
checking whether strptime needs defines... no
checking for library containing inet_pton... none required
checking for library containing socket... none required
checking whether strptime works... yes
checking if nonblocking sockets work... yes
checking whether mkdir has one arg... no
checking for int8_t... yes
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for uint8_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for socklen_t... yes
checking for sig_atomic_t... yes
checking for ssize_t... yes
checking for suseconds_t... yes
checking for in_addr_t... yes
checking for struct sockaddr_storage.ss_family... yes
checking for struct stat.st_mtimensec... yes
checking for struct stat.st_mtim.tv_nsec... yes
checking for struct sockaddr_un.sun_len... yes
checking for unistd.h... (cached) yes
checking for working chown... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking return type of signal handlers... void
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking size of void*... 8
checking size of off_t... 8
checking for getrandom... no
checking for arc4random... yes
checking for arc4random_uniform... yes
checking for library containing setusercontext... -lutil
checking login_cap.h usability... yes
checking login_cap.h presence... yes
checking for login_cap.h... yes
checking for tzset... yes
checking for alarm... yes
checking for chroot... yes
checking for dup2... yes
checking for endpwent... yes
checking for gethostname... yes
checking for memset... yes
checking for memcpy... yes
checking for pwrite... yes
checking for socket... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strdup... yes
checking for strerror... yes
checking for strncasecmp... yes
checking for strtol... yes
checking for writev... yes
checking for getaddrinfo... yes
checking for getnameinfo... yes
checking for freeaddrinfo... yes
checking for gai_strerror... yes
checking for sigaction... yes
checking for sigprocmask... yes
checking for strptime... yes
checking for strftime... yes
checking for localtime_r... yes
checking for setusercontext... yes
checking for glob... yes
checking for initgroups... yes
checking for setresuid... no
checking for setreuid... yes
checking for setresgid... no
checking for setregid... yes
checking for getpwnam... yes
checking for mmap... yes
checking for ppoll... no
checking for clock_gettime... yes
checking for accept4... yes
checking for struct mmsghdr... yes
checking sched.h usability... yes
checking sched.h presence... yes
checking for sched.h... yes
checking sys/cpuset.h usability... no
checking sys/cpuset.h presence... no
checking for sys/cpuset.h... no
checking for cpu_set_t... no
checking for cpuset_t... no
checking for cpuid_t... yes
checking for sched_setaffinity... no
checking for basename... yes
checking for inet_aton... yes
checking for inet_pton... yes
checking for inet_ntop... yes
checking for snprintf... yes
checking for strlcat... yes
checking for strlcpy... yes
checking for strptime... (cached) yes
checking for b64_pton... no
checking for b64_ntop... no
checking for pselect... yes
checking for memmove... yes
checking for setproctitle... yes
checking for reallocarray... yes
checking whether reallocarray is declared... no
checking for pselect prototype in sys/select.h... yes
checking for ctime_r prototype in time.h... yes
checking for struct timespec... yes
checking for SSL... found in /usr
checking if libssl needs libdl... no
checking for HMAC_Update in -lcrypto... yes
checking for openssl/ssl.h... yes
checking for openssl/err.h... yes
checking for openssl/rand.h... yes
checking for openssl/ocsp.h... yes
checking for HMAC_CTX_reset... yes
checking for HMAC_CTX_new... yes
checking for EVP_cleanup... no
checking for ERR_load_crypto_strings... no
checking for OPENSSL_init_crypto... yes
checking for SSL_CTX_set_security_level... no
checking for CRYPTO_memcmp... yes
checking for EC_KEY_new_by_curve_name... yes
checking whether SSL_CTX_set_ecdh_auto is declared... yes
checking whether SSL_CTX_set_tmp_ecdh is declared... yes
checking for OPENSSL_init_ssl... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
=> Modifying libtool scripts to use pkgsrc libtool
=> Modifying libtool scripts to use pkgsrc depcomp
=> Lock /usr/tmp/pkgsrc/net/nsd/work/.lockfile released for ``configure'' on behalf of process 21886
=> Lock /usr/tmp/pkgsrc/net/nsd/work/.lockfile acquired for ``build'' on behalf of process 21886
===> Building for nsd-4.3.1
--- answer.o ---
--- axfr.o ---
--- buffer.o ---
--- configparser.o ---
--- dname.o ---
--- edns.o ---
--- iterated_hash.o ---
--- lookup3.o ---
--- answer.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./answer.c
--- axfr.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./axfr.c
--- buffer.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./buffer.c
--- configparser.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c configparser.c
--- dname.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./dname.c
--- edns.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./edns.c
--- iterated_hash.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./iterated_hash.c
--- lookup3.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./lookup3.c
--- namedb.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./namedb.c
--- dname.o ---
./dname.c: In function 'dname_to_string':
./dname.c:399:3: warning: implicit declaration of function 'strlcpy'; did you mean 'strncpy'? [-Wimplicit-function-declaration]
   strlcpy(buf, ".", sizeof(buf));
   ^~~~~~~
   strncpy
--- nsec3.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./nsec3.c
--- packet.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./packet.c
--- configparser.o ---
configparser.y: In function 'c_parse':
configparser.y:267:11: warning: implicit declaration of function 'strncasecmp' [-Wimplicit-function-declaration]
       if (strncasecmp($2, "ascii_", 6) == 0) {
           ^~~~~~~~~~~
--- query.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./query.c
--- rbtree.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./rbtree.c
--- radtree.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./radtree.c
--- rdata.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./rdata.c
--- region-allocator.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./region-allocator.c
--- rrl.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./rrl.c
--- tsig.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./tsig.c
--- tsig-openssl.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./tsig-openssl.c
--- udb.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./udb.c
--- udbradtree.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./udbradtree.c
--- udbzone.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./udbzone.c
--- util.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./util.c
./util.c: In function 'lookup_by_name':
./util.c:240:7: warning: implicit declaration of function 'strcasecmp' [-Wimplicit-function-declaration]
   if (strcasecmp(name, table->name) == 0)
       ^~~~~~~~~~
./util.c: In function 'b32_ntop':
./util.c:695:3: warning: implicit declaration of function 'strlcpy'; did you mean 'strncpy'? [-Wimplicit-function-declaration]
   strlcpy(target, buf, targsize);
   ^~~~~~~
   strncpy
./util.c: In function 'qid_generate':
./util.c:944:23: warning: implicit declaration of function 'arc4random'; did you mean 'srandom'? [-Wimplicit-function-declaration]
     return (uint16_t) arc4random();
                       ^~~~~~~~~~
                       srandom
./util.c: In function 'random_generate':
./util.c:961:18: warning: implicit declaration of function 'arc4random_uniform' [-Wimplicit-function-declaration]
     return (int) arc4random_uniform(max);
                  ^~~~~~~~~~~~~~~~~~
./util.c: In function 'append_trailing_slash':
./util.c:1148:3: warning: implicit declaration of function 'strlcat'; did you mean 'strncat'? [-Wimplicit-function-declaration]
   strlcat(dirname_slash, "/", l+2);
   ^~~~~~~
   strncat
--- bitset.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./bitset.c
--- popen3.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./popen3.c
--- xfrd-disk.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./xfrd-disk.c
--- xfrd-notify.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./xfrd-notify.c
--- xfrd-tcp.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./xfrd-tcp.c
--- xfrd.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./xfrd.c
--- remote.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./remote.c
--- difffile.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./difffile.c
--- remote.o ---
./remote.c: In function 'do_add_tsig':
./remote.c:2000:3: warning: implicit declaration of function 'strlcpy'; did you mean 'strncpy'? [-Wimplicit-function-declaration]
   strlcpy(algo, "hmac-sha256", sizeof(algo));
   ^~~~~~~
   strncpy
--- ipc.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./ipc.c
--- mini_event.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./mini_event.c
--- netio.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./netio.c
--- nsd.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./nsd.c
--- server.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./server.c
--- dbaccess.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./dbaccess.c
--- dbcreate.o ---
gcc -I/usr/include -I. -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -c ./dbcreate.c
--- nsd.o ---
./nsd.c: In function 'setup_socket':
./nsd.c:154:4: warning: implicit declaration of function 'strlcpy'; did you mean 'strncpy'? [-Wimplicit-function-declaration]
    strlcpy(host_buf, node, len);
    ^~~~~~~
    strncpy
./nsd.c: In function 'find_device':
./nsd.c:322:25: error: 'IFF_UP' undeclared (first use in this function); did you mean 'AF_PUP'?
      ((ifa->ifa_flags & IFF_UP) == 0 ||
                         ^~~~~~
                         AF_PUP
./nsd.c:322:25: note: each undeclared identifier is reported only once for each function it appears in
--- server.o ---
./server.c:147:23: error: array type has incomplete element type 'struct mmsghdr'
 static struct mmsghdr msgs[NUM_RECV_PER_SELECT];
                       ^~~~
./server.c: In function 'server_start_xfrd':
./server.c:1571:3: warning: implicit declaration of function 'setproctitle'; did you mean 'setprotoent'? [-Wimplicit-function-declaration]
   setproctitle("xfrd");
   ^~~~~~~~~~~~
   setprotoent
--- nsd.o ---
./nsd.c:323:25: error: 'IFF_LOOPBACK' undeclared (first use in this function); did you mean 'IN_LOOPBACKNET'?
       (ifa->ifa_flags & IFF_LOOPBACK) != 0 ||
                         ^~~~~~~~~~~~
                         IN_LOOPBACKNET
./nsd.c:324:25: error: 'IFF_RUNNING' undeclared (first use in this function)
       (ifa->ifa_flags & IFF_RUNNING) == 0))
                         ^~~~~~~~~~~
./nsd.c: In function 'main':
./nsd.c:883:8: warning: implicit declaration of function 'strncasecmp' [-Wimplicit-function-declaration]
    if (strncasecmp(optarg, "ascii_", 6) == 0) {
        ^~~~~~~~~~~
./nsd.c:1320:2: warning: implicit declaration of function 'setproctitle'; did you mean 'setprotoent'? [-Wimplicit-function-declaration]
  setproctitle("main");
  ^~~~~~~~~~~~
  setprotoent
./nsd.c:1496:6: warning: implicit declaration of function 'initgroups'; did you mean 'getgroups'? [-Wimplicit-function-declaration]
   if(initgroups(nsd.username, nsd.gid) != 0)
      ^~~~~~~~~~
      getgroups
--- server.o ---
./server.c: In function 'nsd_recvmmsg':
./server.c:3128:25: error: invalid use of undefined type 'struct mmsghdr'
                   msgvec[vpos].msg_hdr.msg_iov->iov_base,
                         ^
./server.c:3128:25: error: dereferencing pointer to incomplete type 'struct mmsghdr'
./server.c:3129:25: error: invalid use of undefined type 'struct mmsghdr'
                   msgvec[vpos].msg_hdr.msg_iov->iov_len,
                         ^
./server.c:3131:25: error: invalid use of undefined type 'struct mmsghdr'
                   msgvec[vpos].msg_hdr.msg_name,
                         ^
./server.c:3132:25: error: invalid use of undefined type 'struct mmsghdr'
                  &msgvec[vpos].msg_hdr.msg_namelen);
                         ^
./server.c:3137:10: error: invalid use of undefined type 'struct mmsghdr'
    msgvec[vpos].msg_len = (unsigned int)rcvd;
          ^
./server.c: In function 'nsd_sendmmsg':
./server.c:3172:22: error: invalid use of undefined type 'struct mmsghdr'
                msgvec[vpos].msg_hdr.msg_iov->iov_base,
                      ^
./server.c:3173:22: error: invalid use of undefined type 'struct mmsghdr'
                msgvec[vpos].msg_hdr.msg_iov->iov_len,
                      ^
./server.c:3175:22: error: invalid use of undefined type 'struct mmsghdr'
                msgvec[vpos].msg_hdr.msg_name,
                      ^
./server.c:3176:22: error: invalid use of undefined type 'struct mmsghdr'
                msgvec[vpos].msg_hdr.msg_namelen);
                      ^
./server.c:3180:10: error: invalid use of undefined type 'struct mmsghdr'
    msgvec[vpos].msg_len = (unsigned int)snd;
          ^
./server.c: In function 'handle_udp':
./server.c:3298:12: error: variable 'mtmp' has initializer but incomplete type
     struct mmsghdr mtmp = msgs[i];
            ^~~~~~~
./server.c:3298:20: error: storage size of 'mtmp' isn't known
     struct mmsghdr mtmp = msgs[i];
                    ^~~~
--- nsd.o ---
*** [nsd.o] Error code 1

make: stopped in /usr/tmp/pkgsrc/net/nsd/work/nsd-4.3.1
--- dbcreate.o ---
./dbcreate.c: In function 'create_dirs':
./dbcreate.c:282:2: warning: implicit declaration of function 'strlcpy'; did you mean 'strncpy'? [-Wimplicit-function-declaration]
  strlcpy(dir, path, sizeof(dir));
  ^~~~~~~
  strncpy
--- server.o ---
*** [server.o] Error code 1

make: stopped in /usr/tmp/pkgsrc/net/nsd/work/nsd-4.3.1
2 errors

make: stopped in /usr/tmp/pkgsrc/net/nsd/work/nsd-4.3.1
*** Error code 2

Stop.
make[1]: stopped in /usr/pkgsrc/net/nsd
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/net/nsd
ryoon@brownie: /usr/pkgsrc/net/nsd
$

For example, initgroups(e) is defined in /usr/include/unistd.h like:
#if defined(_NETBSD_SOURCE)
(snip)
int      initgroups(const char *, gid_t);


And I dislike "warning: implicit declaration of function" messages.

How to fix this problem?

-- 
Ryo ONODERA // ryo%tetera.org@localhost
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3



Home | Main Index | Thread Index | Old Index