Build fails on Solaris 11 with gcc
root@solaris:~/ntpsec# gcc --version
gcc (GCC) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
root@solaris:~/ntpsec# ./waf build
--- building host ---
Waf: Entering directory `/root/ntpsec/build/host'
[1/2] Processing ntpd/ntp_parser.y
[2/2] Compiling build/host/ntpd/ntp_parser.tab.c
[3/4] Compiling ntpd/keyword-gen.c
[4/4] Linking build/host/ntpd/keyword-gen
[5/5] Compiling build/host/ntpd/ntp_parser.tab.h
166 keywords consumed 725 states of 2047 max.
Waf: Leaving directory `/root/ntpsec/build/host'
--- building main ---
Waf: Entering directory `/root/ntpsec/build/main'
--- PYTHONPATH is not set, loading the Python ntp library may be troublesome ---
[ 1/101] Compiling libisc/assertions.c
[ 2/101] Compiling libisc/backtrace-emptytbl.c
[ 3/101] Compiling libisc/backtrace.c
[ 4/101] Compiling libisc/error.c
[ 5/101] Compiling libisc/netaddr.c
[ 6/101] Compiling libisc/sha1.c
[ 7/101] Compiling libisc/errno2result.c
[ 8/101] Compiling libisc/interfaceiter.c
[ 9/101] Compiling libisc/net.c
[ 10/101] Compiling libntp/a_md5encrypt.c
[ 11/101] Compiling libntp/atolfp.c
[ 12/101] Compiling libntp/authkeys.c
[ 13/101] Compiling libntp/authreadkeys.c
[ 14/101] Compiling libntp/clocktime.c
[ 15/101] Compiling libntp/decodenetnum.c
[ 16/101] Compiling libntp/dofptoa.c
[ 17/101] Compiling libntp/dolfptoa.c
[ 18/101] Compiling libntp/getopt.c
[ 19/101] Compiling libntp/initnetwork.c
[ 20/101] Compiling libntp/md5.c
[ 21/101] Compiling libntp/mstolfp.c
[ 22/101] Compiling libntp/netof.c
[ 23/101] Compiling libntp/ntp_endian.c
[ 24/101] Compiling libntp/ntp_intres.c
[ 25/101] Compiling libntp/ntp_random.c
[ 26/101] Compiling libntp/ntp_worker.c
[ 27/101] Compiling libntp/numtoa.c
[ 28/101] Compiling libntp/recvbuff.c
[ 29/101] Compiling libntp/refidsmear.c
[ 30/101] Compiling libntp/socket.c
[ 31/101] Compiling libntp/socktoa.c
[ 32/101] Compiling libntp/ssl_init.c
[ 33/101] Compiling libntp/syssignal.c
[ 34/101] Compiling libntp/work_thread.c
[ 35/101] Compiling libntp/ymd2yd.c
[ 36/101] Compiling libntp/clockwork.c
[ 37/101] Compiling libntp/emalloc.c
[ 38/101] Compiling libntp/hextolfp.c
[ 39/101] Compiling libntp/humandate.c
[ 40/101] Compiling libntp/lib_strbuf.c
[ 41/101] Compiling libntp/msyslog.c
[ 42/101] Compiling libntp/ntp_calendar.c
[ 43/101] Compiling libntp/prettydate.c
[ 44/101] Compiling libntp/statestr.c
[ 45/101] Compiling libntp/strl_obsd.c
[ 46/101] Compiling libntp/systime.c
[ 47/101] Compiling libntp/timetoa.c
[ 48/101] Compiling libntp/pymodule.c
[ 49/101] Compiling libntp/clockwork.c
[ 50/101] Compiling libntp/emalloc.c
../../libntp/pymodule.c: In function ‘ntpc_adj_systime’:
../../libntp/pymodule.c:125:5: warning: passing argument 2 of ‘adj_systime’ from incompatible pointer type [enabled by default]
return Py_BuildValue("d", adj_systime(adjustment, adjtime));
^
In file included from ../../include/ntp.h:25:0,
from ../../include/ntpd.h:11,
from ../../libntp/pymodule.c:12:
../../include/ntp_fp.h:370:13: note: expected ‘int (*)(const struct timeval *, struct timeval *)’ but argument is of type ‘int (*)(struct timeval *, struct timeval *)’
extern bool adj_systime (double, int (*adjtime)(const struct timeval *, struct timeval *));
^
[ 51/101] Compiling libntp/hextolfp.c
[ 52/101] Compiling libntp/humandate.c
[ 53/101] Compiling libntp/lib_strbuf.c
[ 54/101] Compiling libntp/msyslog.c
[ 55/101] Compiling libntp/ntp_calendar.c
[ 56/101] Compiling libntp/prettydate.c
[ 57/101] Compiling libntp/statestr.c
[ 58/101] Compiling libntp/strl_obsd.c
[ 59/101] Compiling libntp/systime.c
[ 60/101] Compiling libntp/timetoa.c
[ 61/101] Compiling libsodium/sodium/core.c
[ 62/101] Compiling libsodium/randombytes/randombytes.c
[ 63/101] Compiling libsodium/randombytes/sysrandom/randombytes_sysrandom.c
[ 64/101] Compiling ntpd/ntp_control.c
../../libsodium/randombytes/sysrandom/randombytes_sysrandom.c: In function ‘randombytes_sysrandom_buf’:
../../libsodium/randombytes/sysrandom/randombytes_sysrandom.c:262:5: warning: comparison is always true due to limited range of data type [-Wtype-limits]
assert(size <= ULONG_LONG_MAX);
^
[ 65/101] Compiling ntpd/ntp_filegen.c
[ 66/101] Compiling ntpd/ntp_leapsec.c
[ 67/101] Compiling ntpd/ntp_monitor.c
[ 68/101] Compiling ntpd/ntp_restrict.c
[ 69/101] Compiling ntpd/ntp_util.c
[ 70/101] Creating build/main/ntpd/version.c
[ 71/101] Compiling ntpd/ntp_config.c
../../ntpd/ntp_config.c: In function ‘ntp_rlimit’:
../../ntpd/ntp_config.c:3693:11: error: ‘RLIMIT_MEMLOCK’ undeclared (first use in this function)
case RLIMIT_MEMLOCK:
^
../../ntpd/ntp_config.c:3693:11: note: each undeclared identifier is reported only once for each function it appears in
Waf: Leaving directory `/root/ntpsec/build/main'
Build failed
-> task in 'ntpd' failed with exit status 1 (run with -v to display more information)