NetBSD Problem Report #53880

From www@NetBSD.org  Wed Jan 16 04:12:28 2019
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id A04827A1B1
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 16 Jan 2019 04:12:28 +0000 (UTC)
Message-Id: <20190116041227.C5E027A270@mollari.NetBSD.org>
Date: Wed, 16 Jan 2019 04:12:27 +0000 (UTC)
From: coypu@sdf.org
Reply-To: coypu@sdf.org
To: gnats-bugs@NetBSD.org
Subject: nameser_compat.h contains an old, outdated endian.h
X-Send-Pr-Version: www-1.0

>Number:         53880
>Category:       toolchain
>Synopsis:       nameser_compat.h contains an old, outdated endian.h
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 16 04:15:00 +0000 2019
>Last-Modified:  Wed Jan 16 07:25:01 +0000 2019
>Originator:     coypu
>Release:        NetBSD 8.99.25
>Organization:
>Environment:
NetBSD 8.99.25 powerpc (not mine)
>Description:
This showed up as a spurious error in a package that included nameser_compat.h first, before anything else

ftp://malus.urc.uninett.no/reports/2018Q3/20181111.1138/loudmouth-1.5.3/build.log

In file included from lm-resolver.c:25:0:
/usr/include/arpa/nameser_compat.h:85:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before string constant
   error "Undefined or invalid BYTE_ORDER";
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


alternative idea, replace block by another header providing _BYTE_ORDER.
Most minimal one is <machine/endian_machdep.h> but <endian.h> should be standard now.
>How-To-Repeat:

>Fix:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: toolchain/53880: nameser_compat.h contains an old, outdated
 endian.h
Date: Wed, 16 Jan 2019 08:20:59 +0100

 On Wed, Jan 16, 2019 at 04:15:00AM +0000, coypu@sdf.org wrote:
 > alternative idea, replace block by another header providing _BYTE_ORDER.
 > Most minimal one is <machine/endian_machdep.h> but <endian.h> should be standard now.

 It is intended that way:

 #if (BSD >= 199103)
 # include <machine/endian.h>

 but of course BSD is likely not defined here.

 So: remove the ifdef mess and use <endian.h> unconditionally.

 Martin

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.