NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/43258: <netdb.h> has redundant redeclaration of 'setservent'

>Number:         43258
>Category:       bin
>Synopsis:       <netdb.h> has redundant redeclaration of 'setservent'
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 05 13:20:00 +0000 2010
>Originator:     Hauke Fath
>Release:        NetBSD 5.0_STABLE
System: NetBSD Hochstuhl 5.0_STABLE NetBSD 5.0_STABLE (GENERIC) #0: Mon Mar 8 
17:31:46 CET 2010 
hf@Hochstuhl:/var/obj/netbsd-builds/5/i386/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386

        /usr/include/netdb.h has a redundant declaration of
        setservent() which breaks builds that fulfill the condition
        '#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0)
        >= 520 || defined(_NETBSD_SOURCE)'.


        Try to build bsnmp <>,
        watch it break with

 cc -c -O2 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W 
-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type 
-Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wbad-function-cast 
-Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -std=c99 
-Wp,-MD,.deps/snmp.d -DPACKAGE_NAME=\"BSNMP\" -DPACKAGE_TARNAME=\"bsnmp\" 
-DQUADFMT=PRIu64 -DQUADXFMT=PRIx64 -I. snmp.c  -fPIC -DPIC -o .libs/snmp.o
cc1: warnings being treated as errors
In file included from snmp.c:46:
/usr/include/netdb.h:349: warning: redundant redeclaration of 'setservent'
/usr/include/netdb.h:339: warning: previous declaration of 'setservent' was here


Index: netdb.h
RCS file: /cvsroot/src/include/netdb.h,v
retrieving revision 1.63
diff -u -u -r1.63 netdb.h
--- netdb.h     25 Apr 2010 00:54:45 -0000      1.63
+++ netdb.h     5 May 2010 13:09:00 -0000
@@ -339,7 +339,6 @@
 void           setprotoent(int);
 #if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \
-void           setservent(int);
 int            getaddrinfo(const char * __restrict, const char * __restrict,
                                 const struct addrinfo * __restrict,
                                 struct addrinfo ** __restrict);

        and pull up the change (at least) to netbsd-5.


Home | Main Index | Thread Index | Old Index