readline/rltypedefs.h:35:22: error: this function declaration is not a prototype on NetBSD 9
BIND9 main
fails to build on NetBSD 9 with Clang 10.0.0 when GNU Readline 8 is installed.
...
configure: checking for readline with -ledit
checking for readline... yes
checking editline/readline.h usability... no
checking editline/readline.h presence... no
checking for editline/readline.h... no
checking edit/readline/readline.h usability... no
checking edit/readline/readline.h presence... no
checking for edit/readline/readline.h... no
checking edit/readline/history.h usability... no
checking edit/readline/history.h presence... no
checking for edit/readline/history.h... no
checking readline/readline.h usability... yes
checking readline/readline.h presence... yes
checking for readline/readline.h... yes
checking readline/history.h usability... yes
checking readline/history.h presence... yes
checking for readline/history.h... yes
...
--- nslookup.o ---
depbase=`echo nslookup.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; clang -DHAVE_CONFIG_H -I. -I../.. -D_FORTIFY_SOURCE=2 -include ../../config.h -I./include -I../../include -I../../lib/isc/unix/include -I../../lib/isc/pthreads/include -I../../lib/isc/include -I../../lib/isc/include -I/usr/pkg/include -I/usr/pkg/include/json-c -I/usr/pkg/include/libxml2 -I../../lib/dns/include -I../../lib/dns/include -I../../lib/isccfg/include -I../../lib/irs/include -I../../lib/bind9/include -Wall -Wextra -Wwrite-strings -Wcast-qual -Wpointer-arith -Wno-missing-field-initializers -Wformat -Wshadow -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=format-security -Werror=parentheses -Werror=implicit -Werror=strict-prototypes -fno-strict-aliasing -fno-delete-null-pointer-checks -fdiagnostics-show-option -g -O2 -pthread -MT nslookup.o -MD -MP -MF $depbase.Tpo -c -o nslookup.o nslookup.c && mv -f $depbase.Tpo $depbase.Po
In file included from nslookup.c:50:
In file included from /usr/pkg/include/readline/readline.h:37:
/usr/pkg/include/readline/rltypedefs.h:35:22: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
typedef int Function () __attribute__ ((deprecated));
^
void
/usr/pkg/include/readline/rltypedefs.h:36:24: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
typedef void VFunction () __attribute__ ((deprecated));
^
void
/usr/pkg/include/readline/rltypedefs.h:37:26: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
typedef char *CPFunction () __attribute__ ((deprecated));
^
void
/usr/pkg/include/readline/rltypedefs.h:38:28: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
typedef char **CPPFunction () __attribute__ ((deprecated));
^
void
In file included from nslookup.c:50:
/usr/pkg/include/readline/readline.h:399:23: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
extern int rl_message ();
^
void
5 errors generated.
*** [nslookup.o] Error code 1
...
--- nsupdate.o ---
depbase=`echo nsupdate.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; clang -DHAVE_CONFIG_H -I. -I../.. -D_FORTIFY_SOURCE=2 -include ../../config.h -I./include -I../../include -I../../lib/isc/unix/include -I../../lib/isc/pthreads/include -I../../lib/isc/include -I../../lib/isc/include -I/usr/pkg/include -I/usr/pkg/include/json-c -I/usr/pkg/include/libxml2 -I../../lib/dns/include -I../../lib/dns/include -I../../lib/isccfg/include -I../../lib/irs/include -I../../lib/bind9/include -DSESSION_KEYFILE=\"/usr/local/var/run/named/session.key\" -Wall -Wextra -Wwrite-strings -Wcast-qual -Wpointer-arith -Wno-missing-field-initializers -Wformat -Wshadow -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=format-security -Werror=parentheses -Werror=implicit -Werror=strict-prototypes -fno-strict-aliasing -fno-delete-null-pointer-checks -fdiagnostics-show-option -g -O2 -pthread -MT nsupdate.o -MD -MP -MF $depbase.Tpo -c -o nsupdate.o nsupdate.c && mv -f $depbase.Tpo $depbase.Po
In file included from nsupdate.c:106:
In file included from /usr/pkg/include/readline/history.h:37:
/usr/pkg/include/readline/rltypedefs.h:35:22: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
typedef int Function () __attribute__ ((deprecated));
^
void
/usr/pkg/include/readline/rltypedefs.h:36:24: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
typedef void VFunction () __attribute__ ((deprecated));
^
void
/usr/pkg/include/readline/rltypedefs.h:37:26: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
typedef char *CPFunction () __attribute__ ((deprecated));
^
void
/usr/pkg/include/readline/rltypedefs.h:38:28: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
typedef char **CPPFunction () __attribute__ ((deprecated));
^
void
In file included from nsupdate.c:107:
/usr/pkg/include/readline/readline.h:399:23: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
extern int rl_message ();
^
void
5 errors generated.
The relevant part of /usr/pkg/include/readline/rltypedefs.h
seems to be:
29 /* Old-style, attempt to mark as deprecated in some way people will notice. */
30
31 #if !defined (_FUNCTION_DEF)
32 # define _FUNCTION_DEF
33
34 #if defined(__GNUC__) || defined(__clang__)
35 typedef int Function () __attribute__ ((deprecated));
36 typedef void VFunction () __attribute__ ((deprecated));
37 typedef char *CPFunction () __attribute__ ((deprecated));
38 typedef char **CPPFunction () __attribute__ ((deprecated));
39 #else
40 typedef int Function ();
41 typedef void VFunction ();
42 typedef char *CPFunction ();
43 typedef char **CPPFunction ();
44 #endif
45
46 #endif /* _FUNCTION_DEF */
With --without-readline
it builds fine.
Other maintained branches does not seem to be affected.