NetBSD Problem Report #51118

From www@NetBSD.org  Fri May  6 10:58:53 2016
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 "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 1B1A77A2AF
	for <gnats-bugs@gnats.NetBSD.org>; Fri,  6 May 2016 10:58:53 +0000 (UTC)
Message-Id: <20160506105851.D39C87AAA2@mollari.NetBSD.org>
Date: Fri,  6 May 2016 10:58:51 +0000 (UTC)
From: jmcneill@invisible.ca
Reply-To: jmcneill@invisible.ca
To: gnats-bugs@NetBSD.org
Subject: libctf tools build fails on FreeBSD 10.3-RELEASE
X-Send-Pr-Version: www-1.0

>Number:         51118
>Category:       toolchain
>Synopsis:       libctf tools build fails on FreeBSD 10.3-RELEASE
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 06 11:00:00 +0000 2016
>Closed-Date:    Mon Jan 09 21:40:29 +0000 2017
>Last-Modified:  Wed Apr 24 12:00:01 +0000 2019
>Originator:     Jared McNeill
>Release:        HEAD
>Organization:
>Environment:
FreeBSD undine.invisible.ca 10.3-RELEASE FreeBSD 10.3-RELEASE #0 r297264: Fri Mar 25 02:10:02 UTC 2016     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
Attempting to build tools fails in compat_defs.h while building libctf:

/usr/home/jmcneill/netbsd/src/tools/libctf/../compat/compat_defs.h:665:2: error: "Don't know how to define SCN[diouxX]8"
#error "Don't know how to define SCN[diouxX]8"
 ^
...

This error happens when UCHAR_MAX is not defined. The failed command was:

cc -O  -DCTF_OLD_VERSIONS -I/usr/home/jmcneill/netbsd/src/tools/libctf/../compat  -I/usr/home/jmcneill/netbsd/src/tools/libctf/../../external/cddl/osnet/sys  -I/usr/home/jmcneill/netbsd/src/tools/libctf/../../external/cddl/osnet/include  -I/usr/home/jmcneill/netbsd/src/tools/libctf/../../external/cddl/osnet/dist/head  -I/usr/home/jmcneill/netbsd/src/tools/libctf/../../external/cddl/osnet/dist/common/ctf  -I/usr/home/jmcneill/netbsd/src/tools/libctf/../../external/cddl/osnet/dist/lib/libctf/common  -I/usr/home/jmcneill/netbsd/src/tools/libctf/../../external/cddl/osnet/dist/uts/common  -I/usr/home/jmcneill/netbsd/src/tools/libctf/../../external/bsd/elftoolchain/dist/libelf -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64  -I/usr/home/jmcneill/netbsd/src/obj/tooldir.FreeBSD-10.3-RELEASE-amd64/include/compat -I/usr/home/jmcneill/netbsd/src/tools/compat  -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -I/usr/home/jmcneill/netbsd/src/obj/tooldir.FreeBSD-10.3-RELEASE-amd64/include -I/usr/hom
 e/jmcneill/netbsd/src/obj/tooldir.FreeBSD-10.3-RELEASE-amd64/include/nbinclude -c -o ctf_hash.lo.o    /usr/home/jmcneill/netbsd/src/tools/libctf/../../external/cddl/osnet/dist/common/ctf/ctf_hash.c

Adding -H to this shows what's going on:

... /usr/include/limits.h
.... /usr/home/jmcneill/netbsd/src/tools/libctf/../../external/cddl/osnet/sys/sys/limits.h

UCHAR_MAX is defined in the native sys/limits.h here, and compat_defs.h with external/cddl/osnet/sys in the search path doesn't hvae a chance to pick it up.
>How-To-Repeat:
On FreeBSD 10.3-RELEASE:

./build.sh -U -m amd64 -j4 tools
>Fix:

>Release-Note:

>Audit-Trail:
From: Michael Plass <mfpnb@plass-family.net>
To: gnats-bugs@NetBSD.org
Cc: Michael Plass <mfpnb@plass-family.net>,
 Jared McNeill <jmcneill@invisible.ca>,
 Nick Hudson <skrll@netbsd.org>
Subject: Re: toolchain/51118: libctf tools build fails on FreeBSD 10.3-RELEASE
Date: Mon, 16 May 2016 13:17:25 -0700

 I was just about to submit a report for this problem, when I found =
 toolchain/51118.

 Patch included below.


 >Release:
         NetBSD-7.99.29

 >Environment:

 FreeBSD home.plass-family.net 8.4-RELEASE-p35 FreeBSD 8.4-RELEASE-p35 =
 #0: Tue Jul 28 10:55:26 UTC 2015     =
 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64


 >Description:

 When building netbsd-current on a FreeBSD-8.4 host, the build fails in =
 the tool stage.

 build.sh command:    ./build.sh -U -m evbarm -a earmv7hf -u release

 Building this way works for netbsd-7. I have not tested on a newer =
 version of freebsd, but the root
 cause appears to be present in all supported freebsd versions (version 8 =
 is past its EOL by a bit).


 First error:
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
                 from =
 /space/ws/netbsd/usr/src/tools/libctf/../../external/cddl/osnet/dist/commo=
 n/ctf/ctf_create.c:23:
 /space/ws/netbsd/usr/src/tools/libctf/../compat/compat_defs.h:665:2: =
 error: #error "Don't know how to define SCN[diouxX]8"
 /space/ws/netbsd/usr/src/tools/libctf/../compat/compat_defs.h:712:2: =
 error: #error "Don't know how to define SCN[diouxX]16"
 /space/ws/netbsd/usr/src/tools/libctf/../compat/compat_defs.h:797:2: =
 error: #error "Don't know how to define SCN[diouxX]32"
 /space/ws/netbsd/usr/src/tools/libctf/../compat/compat_defs.h:882:2: =
 error: #error "Don't know how to define SCN[diouxX]64"

 *** Failed target:  ctf_create.lo
 *** Failed command: cc -O -DCTF_OLD_VERSIONS =
 -I/space/ws/netbsd/usr/src/tools/libctf/../compat =
 -I/space/ws/netbsd/usr/src/tools/libctf/../../external/cddl/osnet/sys =
 -I/space/ws/netbsd/usr/src/tools/libctf/../../external/cddl/osnet/include =
 -I/space/ws/netbsd/usr/src/tools/libctf/../../external/cddl/osnet/dist/hea=
 d =
 -I/space/ws/netbsd/usr/src/tools/libctf/../../external/cddl/osnet/dist/com=
 mon/ctf =
 -I/space/ws/netbsd/usr/src/tools/libctf/../../external/cddl/osnet/dist/lib=
 /libctf/common =
 -I/space/ws/netbsd/usr/src/tools/libctf/../../external/cddl/osnet/dist/uts=
 /common =
 -I/space/ws/netbsd/usr/src/tools/libctf/../../external/bsd/elftoolchain/di=
 st/libelf -DHAVE_NBTOOL_CONFIG_H=3D1 -D_FILE_OFFSET_BITS=3D64 =
 -I/space/ws/netbsd/usr/src/obj/tooldir.FreeBSD-8.4-RELEASE-p35-amd64/inclu=
 de/compat -I/space/ws/netbsd/usr/src/tools/compat =
 -DHAVE_NBTOOL_CONFIG_H=3D1 -D_FILE_OFFSET_BITS=3D64 =
 -I/space/ws/netbsd/usr/src/obj/tooldir.FreeBSD-8.4-RELEASE-p35-amd64/inclu=
 de -I/space/ws/netbsd/usr/src/obj/tooldir.F!
 reeBSD-8.
 4-RELEASE-p35-amd64/include/nbinclude -c -o ctf_create.lo.o =
 /space/ws/netbsd/usr/src/tools/libctf/../../external/cddl/osnet/dist/commo=
 n/ctf/ctf_create.c
 *** Error code 1

 Stop.
 nbmake[3]: stopped in /space/ws/netbsd/usr/src/tools/libctf
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D


 When this error is fixed, a second problem occurs later in the build:
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 =
 /space/ws/netbsd/usr/src/tools/ctfmerge/../../external/cddl/osnet/dist/too=
 ls/ctf/cvt/ctfmerge.c:322:24: error: macro "__assert" passed 4 =
 arguments, but takes just 3
 =
 /space/ws/netbsd/usr/src/tools/ctfmerge/../../external/cddl/osnet/dist/too=
 ls/ctf/cvt/ctfmerge.c:369:36: error: macro "__assert" passed 4 =
 arguments, but takes just 3
 =
 /space/ws/netbsd/usr/src/tools/ctfmerge/../../external/cddl/osnet/dist/too=
 ls/ctf/cvt/ctfmerge.c:381:54: error: macro "__assert" passed 4 =
 arguments, but takes just 3
 =
 /space/ws/netbsd/usr/src/tools/ctfmerge/../../external/cddl/osnet/dist/too=
 ls/ctf/cvt/ctfmerge.c:441:21: error: macro "__assert" passed 4 =
 arguments, but takes just 3
 =
 /space/ws/netbsd/usr/src/tools/ctfmerge/../../external/cddl/osnet/dist/too=
 ls/ctf/cvt/ctfmerge.c:973:35: error: macro "__assert" passed 4 =
 arguments, but takes just 3

 *** Failed target:  ctfmerge.lo
 *** Failed command: cc -O -pthread =
 -I/space/ws/netbsd/usr/src/tools/ctfmerge/../../external/cddl/osnet/sys =
 -I/space/ws/netbsd/usr/src/tools/ctfmerge/../../external/cddl/osnet/includ=
 e =
 -I/space/ws/netbsd/usr/src/tools/ctfmerge/../../external/cddl/osnet/dist =
 -I/space/ws/netbsd/usr/src/tools/ctfmerge/../../external/cddl/osnet/dist/h=
 ead =
 -I/space/ws/netbsd/usr/src/tools/ctfmerge/../../external/cddl/osnet/dist/t=
 ools/ctf/common =
 -I/space/ws/netbsd/usr/src/tools/ctfmerge/../../external/cddl/osnet/dist/t=
 ools/ctf/cvt =
 -I/space/ws/netbsd/usr/src/tools/ctfmerge/../../external/cddl/osnet/dist/u=
 ts/common =
 -I/space/ws/netbsd/usr/src/tools/ctfmerge/../../external/bsd/elftoolchain/=
 dist/libelf =
 -I/space/ws/netbsd/usr/src/tools/ctfmerge/../../external/bsd/elftoolchain/=
 distlibdwarf -DHAVE_NBTOOL_CONFIG_H=3D1 =
 -I/space/ws/netbsd/usr/src/obj/tooldir.FreeBSD-8.4-RELEASE-p35-amd64/inclu=
 de =
 -I/space/ws/netbsd/usr/src/obj/tooldir.FreeBSD-8.4-RELEASE-p35-amd64/inclu=
 de/nbinclude =
 -I/space/ws/netbsd/usr/src/obj/tooldir.FreeBSD-8.4-RELEASE-p35-amd64/inclu=
 de/compat -I/space/ws/netbsd/usr/src/tools/compat =
 -DHAVE_NBTOOL_CONFIG_H=3D1 -D_FILE_OFFSET_BITS=3D64 -Wno-unknown-pragmas =
 -Wno-sign-compare -D_KERNTYPES =
 -I/space/ws/netbsd/usr/src/external/cddl/osnet/sys =
 -I/space/ws/netbsd/usr/src/external/cddl/osnet/include =
 -I/space/ws/netbsd/usr/src/external/cddl/osnet/dist =
 -I/space/ws/netbsd/usr/src/external/cddl/osnet/dist =
 -I/space/ws/netbsd/usr/src/external/cddl/osnet/dist/head =
 -I/space/ws/netbsd/usr/src/external/cddl/osnet/dist/tools/ctf/common =
 -I/space/ws/netbsd/usr/src/external/cddl/osnet/dist/tools/ctf/cvt =
 -I/space/ws/netbsd/usr/src/external/cddl/osnet/dist/uts/common =
 -D_KERNTYPES -c -o ctfmerge.lo.o =
 /space/ws/netbsd/usr/src/tools/ctfmerge/../../external/cddl/osnet/dist/too=
 ls/ctf/cvt/ctfmerge.c
 *** Error code 1

 Stop.
 nbmake[7]: stopped in /space/ws/netbsd/usr/src/tools/ctfmerge

 *** Failed target:  dependall
 *** Failed command: cd "/space/ws/netbsd/usr/src/tools/ctfmerge"; =
 /space/ws/netbsd/usr/src/obj/tooldir.FreeBSD-8.4-RELEASE-p35-amd64/bin/nbm=
 ake realall
 *** Error code 1
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D


 The first error happens because during the bootstrap the include for =
 <sys/limits.h> is resolved to
 external/cddl/osnet/sys/sys/limits.h instead of =
 /usr/include/sys/limits.h, and on freebsd, <limits.h>
 depends on <sys/limits.h> to define constants such a UCHAR_MAX. This =
 breaks the attempt that
 tools/compat/compat_defs.h makes to define any missing PRT* and SCN* =
 print format macros.

 The second is because of a conflict between the defined 3-argument =
 __assert macro and freebsd's 4-argument
 __assert function.

 This patch fixes both of these problems for me:
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 diff --git a/external/cddl/osnet/sys/assert.h =
 b/external/cddl/osnet/sys/assert.h
 index 5c3eb18..8f303f2 100644
 --- a/external/cddl/osnet/sys/assert.h
 +++ b/external/cddl/osnet/sys/assert.h
 @@ -30,7 +30,3 @@
   */
 =20
  #include_next "assert.h"
 -
 -#ifndef __assert
 -#define __assert(a, b, c)       __assert(a, c, b)
 -#endif
 diff --git a/external/cddl/osnet/sys/sys/limits.h =
 b/external/cddl/osnet/sys/sys/limits.h
 index accc2fe..66fe9f0 100644
 --- a/external/cddl/osnet/sys/sys/limits.h
 +++ b/external/cddl/osnet/sys/sys/limits.h
 @@ -29,4 +29,8 @@
   * POSSIBILITY OF SUCH DAMAGE.
   */
 =20
 +#if defined(__FreeBSD__)
 +#include_next <sys/limits.h>
 +#endif
 +
  #include <sys/syslimits.h>
 diff --git a/tools/compat/compat_defs.h b/tools/compat/compat_defs.h
 index 6e8e082..c4f4939 100644
 --- a/tools/compat/compat_defs.h
 +++ b/tools/compat/compat_defs.h
 @@ -41,6 +41,9 @@
  #include <errno.h>
  #include <fcntl.h>
  #include <limits.h>
 +#ifndef UCHAR_MAX
 +#error "oops, UCHAR_MAX should be defined by now"
 +#endif
  #include <paths.h>
  #include <stdarg.h>
  #include <stdio.h>

 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

 Notes:
 In my patch, I did away completely with the compatibility macro for =
 __assert.
 There is only one place I found that might use it, which is
 external/cddl/osnet/dist/lib/libuutil/common/uu_misc.c;
 apparently this code is not even compiled, since it does not show
 up in the build log.

 The guard on the #include_next is needed so that the second compilation =
 later on will
 succeed; I'm sure that there is a better test than looking for =
 __FreeBSD__, but
 it works for me.

 The change to compat_defs.h is not really needed, of course.

 With the patch:
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 make release started at:  Sun May 15 20:59:30 PDT 2016
 make release finished at: Mon May 16 01:20:09 PDT 2016
 =3D=3D=3D> Successful make release
 =3D=3D=3D> build.sh ended:      Mon May 16 01:20:09 PDT 2016
 =3D=3D=3D> Summary of results:
 	 build.sh command:    ./build.sh -U -m evbarm -a earmv7hf -u =
 release
 	 build.sh started:    Sun May 15 20:59:28 PDT 2016
 	 NetBSD version:      7.99.29
 	 MACHINE:             evbarm
 	 MACHINE_ARCH:        earmv7hf
 	 Build platform:      FreeBSD 8.4-RELEASE-p35 amd64
 	 HOST_SH:             /bin/sh
 	 MAKECONF file:       /etc/mk.conf (File not found)
 	 TOOLDIR path:        =
 /space/ws/netbsd/usr/src/obj/tooldir.FreeBSD-8.4-RELEASE-p35-amd64
 	 DESTDIR path:        =
 /space/ws/netbsd/usr/src/obj/destdir.evbarm
 	 RELEASEDIR path:     /space/ws/netbsd/usr/src/obj/releasedir
 	 Updated makewrapper: =
 /space/ws/netbsd/usr/src/obj/tooldir.FreeBSD-8.4-RELEASE-p35-amd64/bin/nbm=
 ake-evbarm
 	 Successful make release
 	 build.sh ended:      Mon May 16 01:20:09 PDT 2016
 =3D=3D=3D> .
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

 - Michael

From: Michael Plass <mfpnb@plass-family.net>
To: gnats-bugs@NetBSD.org
Cc: Michael Plass <mfpnb@plass-family.net>,
 Jared McNeill <jmcneill@invisible.ca>
Subject: Re: toolchain/51118: libctf tools build fails on FreeBSD 10.3-RELEASE
Date: Wed, 17 Aug 2016 14:45:31 -0700

 A better fix is to remove the cddl sys/limits.h and assert.h altogether,
 replacing the references to the former by sys/syslimits.h

 Patch included here, and also on=20
   https://gist.github.com/mfplass/4b14fc832a51471825bd49d8fe9b38c7
 in case of mangled email.

 Patch is against a recent -current. I didn=E2=80=99t re-sort the =
 includes, sorry.

 =
 --------------------------------------------------------------------------=
 --
 commit cc42752c2051c01c879419aa186892d2d327a76b
 Author: Michael Plass <mfp@plass-family.net>
 Date:   Tue Aug 16 20:59:23 2016 -0700

     Remove cddl sys/limits.h and assert.h.
    =20
     These interfere with cross-building on FreeBSD.
     toolchain/51118

 diff --git a/external/cddl/osnet/dev/fbt/fbt.c =
 b/external/cddl/osnet/dev/fbt/fbt.c
 index 854cabe..50fcf22 100644
 --- a/external/cddl/osnet/dev/fbt/fbt.c
 +++ b/external/cddl/osnet/dev/fbt/fbt.c
 @@ -44,7 +44,7 @@
  #include <sys/ksyms.h>
  #include <sys/cpu.h>
  #include <sys/kthread.h>
 -#include <sys/limits.h>
 +#include <sys/syslimits.h>
  #include <sys/linker.h>
  #include <sys/lock.h>
  #include <sys/malloc.h>
 diff --git a/external/cddl/osnet/dev/profile/profile.c =
 b/external/cddl/osnet/dev/profile/profile.c
 index b1b5459..f7f3c02 100644
 --- a/external/cddl/osnet/dev/profile/profile.c
 +++ b/external/cddl/osnet/dev/profile/profile.c
 @@ -44,7 +44,7 @@
  #include <sys/kernel.h>
  #include <sys/kmem.h>
  #include <sys/kthread.h>
 -#include <sys/limits.h>
 +#include <sys/syslimits.h>
  #include <sys/linker.h>
  #include <sys/lock.h>
  #include <sys/malloc.h>
 diff --git a/external/cddl/osnet/dev/sdt/sdt.c =
 b/external/cddl/osnet/dev/sdt/sdt.c
 index 5c607d1..2291011 100644
 --- a/external/cddl/osnet/dev/sdt/sdt.c
 +++ b/external/cddl/osnet/dev/sdt/sdt.c
 @@ -50,7 +50,7 @@ __KERNEL_RCSID(0, "$NetBSD: sdt.c,v 1.17 2016/07/17 =
 02:09:10 pgoyette Exp $");
  #include <sys/eventhandler.h>
  #endif
  #include <sys/kernel.h>
 -#include <sys/limits.h>
 +#include <sys/syslimits.h>
  #ifdef __FreeBSD__
  #include <sys/linker.h>
  #include <sys/linker_set.h>
 diff --git a/external/cddl/osnet/dev/systrace/systrace.c =
 b/external/cddl/osnet/dev/systrace/systrace.c
 index 7ebc89c..c48bebd 100644
 --- a/external/cddl/osnet/dev/systrace/systrace.c
 +++ b/external/cddl/osnet/dev/systrace/systrace.c
 @@ -41,7 +41,7 @@
  #include <sys/kernel.h>
  #include <sys/kmem.h>
  #include <sys/kthread.h>
 -#include <sys/limits.h>
 +#include <sys/syslimits.h>
  #include <sys/linker.h>
  #include <sys/lock.h>
  #include <sys/malloc.h>
 diff --git a/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c =
 b/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c
 index d7b22ec..887a6b7 100644
 --- a/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c
 +++ b/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c
 @@ -119,7 +119,7 @@
  #if !defined(sun)
 =20
  #include <sys/ctype.h>
 -#include <sys/limits.h>
 +#include <sys/syslimits.h>
  //#include <sys/kdb.h>
  #include <sys/kernel.h>
  #include <sys/malloc.h>
 diff --git a/external/cddl/osnet/sys/assert.h =
 b/external/cddl/osnet/sys/assert.h
 deleted file mode 100644
 index 5c3eb18..0000000
 --- a/external/cddl/osnet/sys/assert.h
 +++ /dev/null
 @@ -1,36 +0,0 @@
 -/*	$NetBSD: assert.h,v 1.2 2015/12/27 21:39:34 christos Exp $	=
 */
 -
 -/*-
 - * Copyright (c) 2009 The NetBSD Foundation, Inc.
 - * All rights reserved.
 - *
 - * This code is derived from software contributed to The NetBSD =
 Foundation
 - * by Andrew Doran.
 - *
 - * Redistribution and use in source and binary forms, with or without
 - * modification, are permitted provided that the following conditions
 - * are met:
 - * 1. Redistributions of source code must retain the above copyright
 - *    notice, this list of conditions and the following disclaimer.
 - * 2. Redistributions in binary form must reproduce the above copyright
 - *    notice, this list of conditions and the following disclaimer in =
 the
 - *    documentation and/or other materials provided with the =
 distribution.
 - *
 - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND =
 CONTRIBUTORS
 - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT =
 LIMITED
 - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A =
 PARTICULAR
 - * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR =
 CONTRIBUTORS
 - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, =
 OR
 - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR =
 BUSINESS
 - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER =
 IN
 - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR =
 OTHERWISE)
 - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED =
 OF THE
 - * POSSIBILITY OF SUCH DAMAGE.
 - */
 -
 -#include_next "assert.h"
 -
 -#ifndef __assert
 -#define __assert(a, b, c)       __assert(a, c, b)
 -#endif
 diff --git a/external/cddl/osnet/sys/kern/taskq.c =
 b/external/cddl/osnet/sys/kern/taskq.c
 index 1402148..da5d3ed 100644
 --- a/external/cddl/osnet/sys/kern/taskq.c
 +++ b/external/cddl/osnet/sys/kern/taskq.c
 @@ -385,7 +385,7 @@
  #include <sys/sdt.h>
  #include <sys/mutex.h>
  #include <sys/kernel.h>
 -#include <sys/limits.h>
 +#include <sys/syslimits.h>
 =20
  static kmem_cache_t *taskq_ent_cache, *taskq_cache;
 =20
 diff --git a/external/cddl/osnet/sys/sys/limits.h =
 b/external/cddl/osnet/sys/sys/limits.h
 deleted file mode 100644
 index accc2fe..0000000
 --- a/external/cddl/osnet/sys/sys/limits.h
 +++ /dev/null
 @@ -1,32 +0,0 @@
 -/*	$NetBSD: limits.h,v 1.1 2009/08/07 20:57:57 haad Exp $	*/
 -
 -/*-
 - * Copyright (c) 2009 The NetBSD Foundation, Inc.
 - * All rights reserved.
 - *
 - * This code is derived from software contributed to The NetBSD =
 Foundation
 - * by Andrew Doran.
 - *
 - * Redistribution and use in source and binary forms, with or without
 - * modification, are permitted provided that the following conditions
 - * are met:
 - * 1. Redistributions of source code must retain the above copyright
 - *    notice, this list of conditions and the following disclaimer.
 - * 2. Redistributions in binary form must reproduce the above copyright
 - *    notice, this list of conditions and the following disclaimer in =
 the
 - *    documentation and/or other materials provided with the =
 distribution.
 - *
 - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND =
 CONTRIBUTORS
 - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT =
 LIMITED
 - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A =
 PARTICULAR
 - * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR =
 CONTRIBUTORS
 - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, =
 OR
 - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR =
 BUSINESS
 - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER =
 IN
 - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR =
 OTHERWISE)
 - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED =
 OF THE
 - * POSSIBILITY OF SUCH DAMAGE.
 - */
 -
 -#include <sys/syslimits.h>
 diff --git a/external/cddl/osnet/sys/sys/zfs_context.h =
 b/external/cddl/osnet/sys/sys/zfs_context.h
 index 4f98e85..53ce002 100644
 --- a/external/cddl/osnet/sys/sys/zfs_context.h
 +++ b/external/cddl/osnet/sys/sys/zfs_context.h
 @@ -582,7 +582,7 @@ extern char *kmem_asprintf(const char *fmt, ...);
 =20
  #include <sys/systm.h>
  #include <sys/kcondvar.h>
 -#include <sys/limits.h>
 +#include <sys/syslimits.h>
  #include <sys/kmem.h>
  #include <sys/param.h>
  #include <sys/stdint.h>
 =
 --------------------------------------------------------------------------=
 --

State-Changed-From-To: open->feedback
State-Changed-By: buhrow@NetBSD.org
State-Changed-When: Fri, 06 Jan 2017 19:44:43 +0000
State-Changed-Why:
Testing the final patch against -current sources as of 01/06/2017
Checking against various build environments.
.


From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51118 CVS commit: src/external/cddl/osnet
Date: Sat, 7 Jan 2017 16:39:53 -0500

 Module Name:	src
 Committed By:	christos
 Date:		Sat Jan  7 21:39:53 UTC 2017

 Modified Files:
 	src/external/cddl/osnet/dev/fbt: fbt.c
 	src/external/cddl/osnet/dev/profile: profile.c
 	src/external/cddl/osnet/dev/sdt: sdt.c
 	src/external/cddl/osnet/dev/systrace: systrace.c
 	src/external/cddl/osnet/dist/uts/common/dtrace: dtrace.c
 	src/external/cddl/osnet/sys/kern: taskq.c
 	src/external/cddl/osnet/sys/sys: zfs_context.h
 Removed Files:
 	src/external/cddl/osnet/sys: assert.h
 	src/external/cddl/osnet/sys/sys: limits.h

 Log Message:
 PR/51118: Jared McNeill: Fix build on FreeBSD by removing osnet assert.h
 and sys/limits.h and use sys/syslimits.h directly.


 To generate a diff of this commit:
 cvs rdiff -u -r1.20 -r1.21 src/external/cddl/osnet/dev/fbt/fbt.c
 cvs rdiff -u -r1.6 -r1.7 src/external/cddl/osnet/dev/profile/profile.c
 cvs rdiff -u -r1.17 -r1.18 src/external/cddl/osnet/dev/sdt/sdt.c
 cvs rdiff -u -r1.8 -r1.9 src/external/cddl/osnet/dev/systrace/systrace.c
 cvs rdiff -u -r1.34 -r1.35 \
     src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c
 cvs rdiff -u -r1.2 -r0 src/external/cddl/osnet/sys/assert.h
 cvs rdiff -u -r1.5 -r1.6 src/external/cddl/osnet/sys/kern/taskq.c
 cvs rdiff -u -r1.1 -r0 src/external/cddl/osnet/sys/sys/limits.h
 cvs rdiff -u -r1.16 -r1.17 src/external/cddl/osnet/sys/sys/zfs_context.h

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: feedback->closed
State-Changed-By: buhrow@NetBSD.org
State-Changed-When: Mon, 09 Jan 2017 21:40:29 +0000
State-Changed-Why:
Christos committed the final patches in PR-51118  and folks report that this fixes
the problem.
here is Christos' commit message:
revision 1.21
date: 2017-01-07 21:39:52 +0000;  author: christos;  state: Exp;  lines: +2 -2;
 commitid: czT6FbnFZbkxb5Bz;
PR/51118: Jared McNeill: Fix build on FreeBSD by removing osnet assert.h
and sys/limits.h and use sys/syslimits.h directly.

.


From: "Maya Rashish" <maya@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51118 CVS commit: src/external/bsd/ntp/dist/ntpd
Date: Wed, 24 Apr 2019 11:55:05 +0000

 Module Name:	src
 Committed By:	maya
 Date:		Wed Apr 24 11:55:05 UTC 2019

 Modified Files:
 	src/external/bsd/ntp/dist/ntpd: ntp_config.c

 Log Message:
 Only warn about being unable to make a smaller stack if asking for debug
 messages.

 Between ASLR and stack clash random-sized padding, we can't make small
 stacks reliably. Not doing so isn't a problem, so don't warn users about
 it on every boot.

 PR bin/51118


 To generate a diff of this commit:
 cvs rdiff -u -r1.20 -r1.21 src/external/bsd/ntp/dist/ntpd/ntp_config.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

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.