summaryrefslogtreecommitdiffstats
path: root/lib/libnetbsd/sys/types.h
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2017-02-21 03:46:37 +0000
committerngie <ngie@FreeBSD.org>2017-02-21 03:46:37 +0000
commite902f09805f6f217a23eeddcbeaf7199090b20bd (patch)
tree8a10d602da8416b3df251e7a46a409b284ab2a7c /lib/libnetbsd/sys/types.h
parent2c373db546ea8a67318e412fcf159b0c7e645609 (diff)
downloadFreeBSD-src-e902f09805f6f217a23eeddcbeaf7199090b20bd.zip
FreeBSD-src-e902f09805f6f217a23eeddcbeaf7199090b20bd.tar.gz
MFC r313404:
Improve libnetbsd compatibility with NetBSD This change is being made to diff reduce/reduce duplication in contrib/netbsd-tests and to facilitate further porting of software from NetBSD Add the following headers: - sys/event.h: -- sys/types.h is required for kqueue on FreeBSD, but not NetBSD. - sys/types.h: -- NBBY is defined in sys/param.h on FreeBSD, not sys/types.h like on NetBSD. Pull in sys/param.h to have parity with NetBSD. - sys/wait.h: -- Define wrusage as __wrusage for parity with NetBSD typedef. - glob.h -- Define __gl_stat_t as "struct stat" for parity with NetBSD typedef. - pthread.h: -- Pull in pthread_np.h for _np functions defined separately on FreeBSD. Improve compatibility with NetBSD in the following headers: - sha1.h: -- define SHA1_CTX as SHA_CTX -- define SHA1Final as SHA1_Final - sha2.h: -- #include sha384 to pick up all of the SHA 384 bit macros and definitions. - util.h: -- Add sys/types.h to util.h to pollute the header for types used in flags_to_string and string_to_flags (u_long) as NetBSD doesn't require them for the functions.
Diffstat (limited to 'lib/libnetbsd/sys/types.h')
-rw-r--r--lib/libnetbsd/sys/types.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/libnetbsd/sys/types.h b/lib/libnetbsd/sys/types.h
new file mode 100644
index 0000000..e14dd49
--- /dev/null
+++ b/lib/libnetbsd/sys/types.h
@@ -0,0 +1,37 @@
+/*-
+ * Copyright (c) 2017 Dell, Inc.
+ * All rights reserved.
+ *
+ * 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 REGENTS 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 REGENTS 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.
+ *
+ * $FreeBSD$ *
+ */
+
+#ifndef _LIBNETBSD_SYS_TYPES_H_
+#define _LIBNETBSD_SYS_TYPES_H_
+
+#include_next <sys/types.h>
+
+#include <sys/param.h> /* For NBBY */
+
+#endif
OpenPOWER on IntegriCloud