Created
August 17, 2016 21:27
-
-
Save mfplass/4b14fc832a51471825bd49d8fe9b38c7 to your computer and use it in GitHub Desktop.
Patch for building NetBSD on FreeBSD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | |
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) | |
#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> | |
static kmem_cache_t *taskq_ent_cache, *taskq_cache; | |
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, ...); | |
#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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment