check.c:1576:37: error: expected identifier before numeric constant on illumos
On OpenIndiana 2020.04 (an illumos distribution) compilation of BIND v9_16
commit 38ca3fbc fails in lib/bind9/check.c
with:
libtool: compile: /usr/gcc/7/bin/gcc -include /export/home/newman/bind9/config.h -I/export/home/newman/bind9 -I../.. -I. -I/export/home/newman/bind9/lib/bind9/include -I../../lib/bind9/include -I/export/home/newman/bind9/lib/dns/include -I../../lib/dns/include -I/export/home/newman/bind9/lib/isc/include -I../../lib/isc -I../../lib/isc/include -I../../lib/isc/unix/include -I../../lib/isc/pthreads/include -I/export/home/newman/bind9/lib/isccfg/include -I../../lib/isccfg/include -I/export/home/newman/bind9/lib/ns/include -I../../lib/ns/include -DISC_MEM_DEFAULTFILL=1 -DISC_LIST_CHECKINIT=1 -m64 -O3 -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1 -D_XPG6 -D_POSIX_PTHREAD_SEMANTICS -pthread -fPIC -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -Wno-missing-field-initializers -fno-strict-aliasing -Wshadow -Werror -c check.c -fPIC -DPIC -o .libs/check.o
In file included from /usr/include/sys/select.h:53:0,
from /usr/include/sys/types.h:640,
from /usr/include/sys/wait.h:37,
from /usr/include/stdlib.h:45,
from check.c:16:
check.c: In function 'check_options':
check.c:1576:37: error: expected identifier before numeric constant
enum { MAS = 1, PRI = 2, SLA = 4, SEC = 8 } values = 0;
^
gmake[2]: *** [Makefile:273: check.lo] Error 1
It turns out that /usr/include/sys/time.h
has SEC
defined.
Renaming SEC
to SCN
in lib/bind9/check.c
does the trick. The introduction of SEC
was in dca36587.
Edited by Michal Nowak