Error-messages when compiling bind 9.3.2

Rick Jones rick.jones2 at hp.com
Fri Jan 13 00:33:12 UTC 2006


Tom Schmitt <TomSchmitt at gmx.de> wrote:
> gcc  -I/dns/src/bind-9.3.2 -I./include -I./../include
> -I/dns/src/bind-9.3.2/lib/dns/include -I../../../lib/dns/include
> -I/dns/src/bind-9.3.2/lib/isc/include -I../../../lib/isc
> -I../../../lib/isc/include -I../../../lib/isc/unix/include
> -I../../../lib/isc/pthreads/include  -D_REENTRANT  -D_XPG4_2
> -D__EXTENSIONS__ -g -O2  -W -Wall -Wmissing-prototypes -Wcast-qual
> -Wwrite-strings -Wformat  -c os.c
> os.c: In function `ns_os_daemonize':
> os.c:312: warning: implicit declaration of function `pipe'
> os.c:317: warning: implicit declaration of function `fork'
> os.c:329: warning: implicit declaration of function `close'
> os.c:332: warning: implicit declaration of function `read'
> os.c:334: warning: implicit declaration of function `_exit'
> os.c:348: warning: implicit declaration of function `setsid'
> os.c:364: error: `STDIN_FILENO' undeclared (first use in this function)
> os.c:364: error: (Each undeclared identifier is reported only once
> os.c:364: error: for each function it appears in.)
> os.c:366: warning: implicit declaration of function `dup2'
> os.c:368: error: `STDOUT_FILENO' undeclared (first use in this function)
> os.c:372: error: `STDERR_FILENO' undeclared (first use in this function)
> os.c: In function `ns_os_started':
> os.c:387: warning: implicit declaration of function `write'
> os.c: In function `ns_os_closedevnull':
> os.c:400: error: `STDIN_FILENO' undeclared (first use in this function)
> os.c:401: error: `STDOUT_FILENO' undeclared (first use in this function)
> os.c:402: error: `STDERR_FILENO' undeclared (first use in this function)
> </SNIP>

Looks like the compilation was missing or or more include files.  You
might try something along the lines of:

find /usr/include -exec grep -l pipe {} \;

and then examine the "hits" with an editor to find which of the
standard include files contains the declaration for pipe (and the
other missing routines) and go from there.  Do the same for
"STDIN_FILENO" "STDOUT_FILENO" and "STDERR_FILENO" - I suspect you
will find they are all in the same include file.

I've heard that gcc likes to do strange and bizzare things wrt
"preparing" include files.  You might want to consider using another
compiler as a comparison.

Oh, and possibly just a silly question, but the file os.c _is_
including stdio.h right?

rick jones
-- 
Wisdom Teeth are impacted, people are affected by the effects of events.
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...



More information about the bind-users mailing list