NetBSD Problem Report #1121

From gnats  Wed Jun  7 05:43:49 1995
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.10/8.6.10) with ESMTP id FAA05904 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Wed, 7 Jun 1995 05:43:48 -0700
Message-Id: <m0sJKTC-0008oUC@daisy.ee.und.ac.za>
Date: Wed, 7 Jun 95 14:44 GMT+0200
From: barrett@ee.und.ac.za
Reply-To: barrett@ee.und.ac.za
To: gnats-bugs@NetBSD.ORG
Subject: satosin() macro multiply defined
X-Send-Pr-Version: 3.2

>Number:         1121
>Category:       kern
>Synopsis:       #define satosin in netiso/tp_param.h disagrees with netinet/in.h
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 07 05:50:01 +0000 1995
>Closed-Date:    Wed Jun 07 15:20:57 +0000 1995
>Last-Modified:  
>Originator:     Alan Barrett
>Release:        NetBSD-current 1995-06-06
>Organization:
Not much
>Environment:
System: NetBSD daisy.ee.und.ac.za 1.0A NetBSD 1.0A (DAISY) #0: Sun May 21 20:13:39 GMT+0200 1995 barrett@daisy.ee.und.ac.za:/usr/src/sys/arch/i386/compile/DAISY i386


>Description:
	Several kernel source files fail to compile, with errors about
	satosin being redefined.  This is because sys/netiso/tp_emit.h
	and sys/netinet/in.h contain different definitions of the
	satosin macro.  The two definitions are effectively identical,
	except for the names of the parameters, but ANSI/ISO 9899:1990
	section 6.8.3 says that even the names of the parameters have to
	be identical if a macro is redefined.
>How-To-Repeat:
	configure kernel with both IP and ISO options.
	try to build kernel.
	see the error messages.  For example:

cc [lots of options] ../../../../netiso/tp_emit.c
In file included from ../../../../netiso/tp_emit.c:92:
../../../../netiso/tp_param.h:274: warning: `satosin' redefined
../../../../netinet/in.h:264: warning: this is the location of the previous
definition
*** Error code 1

>Fix:
	Either
		make the two definitions of satosin identical
	or
                remove the definition of satosin from netiso/tp_param.h,
                and let anything that needs satosin get it from
                netinet/in.h instead of from netiso/tp_param.h.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mycroft 
State-Changed-When: Wed Jun 7 08:20:57 PDT 1995 
State-Changed-Why:  
Fixed. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.