Comments (10)
So I see from the config.log there is an issue with the reallocarray test. It did not properly detect it, both times. The first needed to do the define before include, the second test for the header declaration, and if missing set it to have the defines. The commit fixes that, 3643df6 .
from nsd.
NSD already tests for reallocarray in configure. It also defines OPENBSD_SOURCE. Do you have configure output or config.log? For the reallocarray, pselect, pselect prototype, ctime prototype, strptime parts? Otherwise I can try to guess what it is, but I'd prefer to look at the output.
from nsd.
So, the commit checks for reallocarray needing a define, and if so defines it. That should solve the compile and make #81 not needed. If it works. Could still have #81 too if that is better code.
Thanks for the detailed information!
from nsd.
Hi @wcawijngaards,
OK, so I sync'd with upstream and I am on Master, which is NLNet Labs code (no patches). Then a distclean && autoreconf && ./configure
.
Here is what we see for configure:
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
Then:
gcc -I. -I/usr/pkg/include -g -O2 -flto -c ./udbzone.c
gcc -I. -I/usr/pkg/include -g -O2 -flto -c ./util.c
./util.c: In function 'xmallocarray':
./util.c:273:24: warning: implicit declaration of function 'reallocarray' [-Wimplicit-function-declaration]
void *result = reallocarray(NULL, num, size);
^
./util.c:273:24: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
gcc -I. -I/usr/pkg/include -g -O2 -flto -c ./bitset.c
The config.log
for the build is attached: config.log.zip
from nsd.
OK, resync with master and clean. Then autoreconf && configure
:
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
Then make
:
config.status: creating Makefile
config.status: creating config.h
gcc -I. -I/usr/pkg/include -g -O2 -flto -c ./answer.c
In file included from ./query.h:17:0,
from ./answer.h:18,
from ./answer.c:14:
./nsd.h:133:14: error: 'IFNAMSIZ' undeclared here (not in a function)
char device[IFNAMSIZ];
^
*** Error code 1
For NetBSD, it looks like the header <net/if.h>
needs to be included.
Here is the latest config.log.zip.
from nsd.
Can you see in net/if.h if IFNAMSIZ
is defined there, the if_nametoindex man page for NetBSD talks about it. Otherwise I can fix this with a #ifndef for IFNAMSIZE, I guess.
from nsd.
I mean the net/if.h include is already present in nsd.h, but somehow the define is not there?
from nsd.
That commit could maybe solve the issue by using backup definitions, it looks like it would otherwise be exported if _NSDBSD_SOURCE is defined. This is also something I can do, but this may also work on other systems.
from nsd.
Arguably we only need the device name on Linux. It's only needed for bindtodevice and that's Linux only, so a if defined(__linux)
would work too...
from nsd.
Latest results after a sync and clean build:
gcc -I. -I/usr/pkg/include -g -O2 -flto -c ./answer.c
gcc -I. -I/usr/pkg/include -g -O2 -flto -c ./axfr.c
gcc -I. -I/usr/pkg/include -g -O2 -flto -c ./buffer.c
gcc -I. -I/usr/pkg/include -g -O2 -flto -c configlexer.c
gcc -I. -I/usr/pkg/include -g -O2 -flto -c configparser.c
./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) {
^
gcc -I. -I/usr/pkg/include -g -O2 -flto -c ./dname.c
./dname.c: In function 'dname_to_string':
./dname.c:399:3: warning: implicit declaration of function 'strlcpy' [-Wimplicit-function-declaration]
strlcpy(buf, ".", sizeof(buf));
^
gcc -I. -I/usr/pkg/include -g -O2 -flto -c ./dns.c
./dns.c: In function 'rrclass_to_string':
./dns.c:927:3: warning: implicit declaration of function 'strlcpy' [-Wimplicit-function-declaration]
strlcpy(buf, entry->name, sizeof(buf));
^
gcc -I. -I/usr/pkg/include -g -O2 -flto -c ./edns.c
gcc -I. -I/usr/pkg/include -g -O2 -flto -c ./iterated_hash.c
gcc -I. -I/usr/pkg/include -g -O2 -flto -c ./lookup3.c
gcc -I. -I/usr/pkg/include -g -O2 -flto -c ./namedb.c
gcc -I. -I/usr/pkg/include -g -O2 -flto -c ./nsec3.c
gcc -I. -I/usr/pkg/include -g -O2 -flto -c ./options.c
./options.c: In function 'config_cook_string':
./options.c:1720:2: warning: implicit declaration of function 'strlcpy' [-Wimplicit-function-declaration]
strlcpy(f, input, sizeof(f));
^
gcc -I. -I/usr/pkg/include -g -O2 -flto -c ./packet.c
gcc -I. -I/usr/pkg/include -g -O2 -flto -c ./query.c
gcc -I. -I/usr/pkg/include -g -O2 -flto -c ./rbtree.c
gcc -I. -I/usr/pkg/include -g -O2 -flto -c ./radtree.c
gcc -I. -I/usr/pkg/include -g -O2 -flto -c ./rdata.c
gcc -I. -I/usr/pkg/include -g -O2 -flto -c ./region-allocator.c
gcc -I. -I/usr/pkg/include -g -O2 -flto -c ./rrl.c
gcc -I. -I/usr/pkg/include -g -O2 -flto -c ./tsig.c
gcc -I. -I/usr/pkg/include -g -O2 -flto -c ./tsig-openssl.c
gcc -I. -I/usr/pkg/include -g -O2 -flto -c ./udb.c
gcc -I. -I/usr/pkg/include -g -O2 -flto -c ./udbradtree.c
gcc -I. -I/usr/pkg/include -g -O2 -flto -c ./udbzone.c
gcc -I. -I/usr/pkg/include -g -O2 -flto -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' [-Wimplicit-function-declaration]
strlcpy(target, buf, targsize);
^
./util.c: At top level:
./util.c:843:8: error: unknown type name 'u_long'
static u_long crctab[] = {
^
./util.c: In function 'qid_generate':
./util.c:944:23: warning: implicit declaration of function 'arc4random' [-Wimplicit-function-declaration]
return (uint16_t) arc4random();
^
./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' [-Wimplicit-function-declaration]
strlcat(dirname_slash, "/", l+2);
^
*** Error code 1
And the latest config.log.zip.
from nsd.
Related Issues (20)
- Build errors for 4.10.0rc1 HOT 11
- multiple "xfrd: zone %s written received XFR packet from %s with serial %u to " logged HOT 3
- RFC8482 behavior documentation HOT 1
- Minor recursive Makefile issue
- mutual tls authentication is not complete HOT 2
- nsd verification processing hangs, activity stopped for 20-30 minutes HOT 3
- NSD 4.10.0's `nsd-checkzone` cannot read zonefiles from `stdin`
- are flex and bison still required? HOT 1
- nsd 4.10.0 x86 builds failed HOT 2
- zonefile with $include relative path stopped working HOT 1
- Update simdzone HOT 2
- Assertion `token->code == RIGHT_PAREN' failed HOT 14
- Adjust verbosity for TLS (+TCP) to be 5 HOT 1
- Select simdzone kernel on start HOT 1
- Document compile options in `doc/README`?
- Timeout events not handled correctly in `mini-event`?
- Build failure on Solaris 10
- FreeBSD on version 4.10.0 HOT 5
- Read client certificates before dropping privileges
- Bugs/notes related to Mutual TLS HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nsd.