NetBSD Problem Report #43258
From hf@spg.tu-darmstadt.de Wed May 5 13:18:23 2010
Return-Path: <hf@spg.tu-darmstadt.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 6279763B8FE
for <gnats-bugs@gnats.NetBSD.org>; Wed, 5 May 2010 13:18:23 +0000 (UTC)
Message-Id: <201005051318.o45DIGdF025677@Hochstuhl.nt.e-technik.tu-darmstadt.de>
Date: Wed, 5 May 2010 15:18:16 +0200 (CEST)
From: Hauke Fath <hf@spg.tu-darmstadt.de>
Reply-To: Hauke Fath <hf@spg.tu-darmstadt.de>
To: gnats-bugs@gnats.NetBSD.org
Cc: Hauke Fath <hf@spg.tu-darmstadt.de>
Subject: <netdb.h> has redundant redeclaration of 'setservent'
X-Send-Pr-Version: 3.95
>Number: 43258
>Category: bin
>Synopsis: <netdb.h> has redundant redeclaration of 'setservent'
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed May 05 13:20:00 +0000 2010
>Closed-Date: Wed May 05 17:13:09 +0000 2010
>Last-Modified: Wed May 05 17:15:02 +0000 2010
>Originator: Hauke Fath
>Release: NetBSD 5.0_STABLE
>Organization:
>Environment:
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
>Description:
/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)'.
>How-To-Repeat:
Try to build bsnmp <http://people.freebsd.org/~harti/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\" -DPACKAGE_VERSION=\"1.0\" "-DPACKAGE_STRING=\"BSNMP 1.0\"" -DPACKAGE_BUGREPORT=\"harti@freebsd.org\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_ERR_H=1 -DHAVE_STRLCPY=1 -DHAVE_GETADDRINFO=1 -DHAVE_SYS_TREE_H=1 -DHAVE_STDINT_H=1 -DHAVE_INTTYPES_H=1 -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
>Fix:
Apply
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 || \
defined(_NETBSD_SOURCE)
-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.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: christos@NetBSD.org
State-Changed-When: Wed, 05 May 2010 13:13:09 -0400
State-Changed-Why:
fix applied on head.
From: Christos Zoulas <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/43258 CVS commit: src/include
Date: Wed, 5 May 2010 13:12:29 -0400
Module Name: src
Committed By: christos
Date: Wed May 5 17:12:29 UTC 2010
Modified Files:
src/include: netdb.h
Log Message:
PR/43258: Hauke Fath: remove duplicate setservent declaration
To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/include/netdb.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.