From 2cd691c6fa0a79e23b7cefbdf2701ff4ae87ac96 Mon Sep 17 00:00:00 2001
From: Sascha Wildner <saw@online.de>
Date: Thu, 4 Jan 2018 15:26:52 +0100
Subject: [PATCH] include: Change standard headers to be actual files, not
 symlinks.

The actual content is in the <sys/${header}> counterpart for these,
because the kernel needs them too (in its tree). Instead of having
them as symlinks, create wrappers around the <sys/${header}> ones.
This means, no functional change.

Two reasons for this:

* It is advantageous in some cases to have an actual file in
  /usr/src/include.

* Include guards can be named correctly now.
---
 include/Makefile    | 24 +++++++++++-------------
 include/aio.h       | 37 +++++++++++++++++++++++++++++++++++++
 include/errno.h     | 37 +++++++++++++++++++++++++++++++++++++
 include/fcntl.h     | 37 +++++++++++++++++++++++++++++++++++++
 include/poll.h      | 37 +++++++++++++++++++++++++++++++++++++
 include/sched.h     | 37 +++++++++++++++++++++++++++++++++++++
 include/semaphore.h | 37 +++++++++++++++++++++++++++++++++++++
 include/syslog.h    | 37 +++++++++++++++++++++++++++++++++++++
 include/termios.h   | 37 +++++++++++++++++++++++++++++++++++++
 include/ucontext.h  | 37 +++++++++++++++++++++++++++++++++++++
 sys/sys/sched.h     |  6 +++---
 sys/sys/semaphore.h | 12 ++++++------
 12 files changed, 353 insertions(+), 22 deletions(-)
 create mode 100644 include/aio.h
 create mode 100644 include/errno.h
 create mode 100644 include/fcntl.h
 create mode 100644 include/poll.h
 create mode 100644 include/sched.h
 create mode 100644 include/semaphore.h
 create mode 100644 include/syslog.h
 create mode 100644 include/termios.h
 create mode 100644 include/ucontext.h

diff --git a/include/Makefile b/include/Makefile
index 9bd88026f0..bae8adc5e4 100644
--- a/include/Makefile
+++ b/include/Makefile
@@ -8,25 +8,24 @@
 
 CLEANFILES= osreldate.h version vers.c vers.txt
 SUBDIR= arpa protocols rpc rpcsvc xlocale
-INCS=	a.out.h ar.h assert.h bitstring.h cpio.h ctype.h db.h \
-	dirent.h disktab.h \
-	dlfcn.h elf.h elf-hints.h err.h float.h fmtmsg.h fnmatch.h fstab.h \
-	fts.h ftw.h getopt.h glob.h grp.h \
+INCS=	aio.h a.out.h ar.h assert.h bitstring.h cpio.h ctype.h db.h \
+	dirent.h disktab.h dlfcn.h \
+	elf.h elf-hints.h err.h errno.h \
+	fcntl.h float.h fmtmsg.h fnmatch.h fstab.h fts.h ftw.h \
+	getopt.h glob.h grp.h \
 	iconv.h ieeefp.h ifaddrs.h iso646.h inttypes.h kenv.h \
 	langinfo.h libgen.h limits.h link.h locale.h memory.h \
 	mntopts.h mpool.h mqueue.h monetary.h ndbm.h netconfig.h \
 	netdb.h nl_types.h nlist.h nss.h nsswitch.h objformat.h \
-	paths.h printf.h pthread.h pthread_np.h pwd.h \
+	paths.h poll.h printf.h pthread.h pthread_np.h pwd.h \
 	ranlib.h readpassphrase.h \
 	res_update.h resolv.h re_comp.h rmd160.h \
-	runetype.h search.h setjmp.h sgtty.h \
+	runetype.h search.h setjmp.h sgtty.h sched.h semaphore.h \
 	signal.h spawn.h stdalign.h stdarg.h stdbool.h \
 	stddef.h stdint.h stdio.h stdlib.h stdnoreturn.h \
-	string.h stringlist.h strings.h sysexits.h \
-	tar.h time.h \
-	timeconv.h \
-	timers.h ttyent.h \
-	uchar.h unistd.h ulimit.h utime.h utmp.h utmpx.h \
+	string.h stringlist.h strings.h sysexits.h syslog.h \
+	tar.h termios.h time.h timeconv.h timers.h ttyent.h \
+	uchar.h ucontext.h unistd.h ulimit.h utime.h utmp.h utmpx.h \
 	uuid.h vis.h \
 	wchar.h wctype.h wordexp.h xlocale.h
 
@@ -37,8 +36,7 @@ INCS+=	hesiod.h
 # Only for default SHARED=copies case
 SHDRS=	soundcard.h joystick.h
 
-LHDRS=	aio.h errno.h fcntl.h linker_set.h poll.h sched.h \
-	semaphore.h syslog.h termios.h ucontext.h
+LHDRS=	linker_set.h
 
 # directories which also contain header files that need to be copied.
 # Other directories, like 'bus' and 'netproto', are created using mtree.
diff --git a/include/aio.h b/include/aio.h
new file mode 100644
index 0000000000..47937a5ae4
--- /dev/null
+++ b/include/aio.h
@@ -0,0 +1,37 @@
+/*-
+ * Copyright (c) 2018 The DragonFly Project.  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.
+ * 3. Neither the name of The DragonFly Project nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific, prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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
+ * COPYRIGHT HOLDERS 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.
+ */
+
+#ifndef _AIO_H_
+#define	_AIO_H_
+
+#include <sys/aio.h>
+
+#endif
diff --git a/include/errno.h b/include/errno.h
new file mode 100644
index 0000000000..eee078aa88
--- /dev/null
+++ b/include/errno.h
@@ -0,0 +1,37 @@
+/*-
+ * Copyright (c) 2018 The DragonFly Project.  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.
+ * 3. Neither the name of The DragonFly Project nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific, prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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
+ * COPYRIGHT HOLDERS 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.
+ */
+
+#ifndef _ERRNO_H_
+#define	_ERRNO_H_
+
+#include <sys/errno.h>
+
+#endif
diff --git a/include/fcntl.h b/include/fcntl.h
new file mode 100644
index 0000000000..4cac009468
--- /dev/null
+++ b/include/fcntl.h
@@ -0,0 +1,37 @@
+/*-
+ * Copyright (c) 2018 The DragonFly Project.  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.
+ * 3. Neither the name of The DragonFly Project nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific, prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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
+ * COPYRIGHT HOLDERS 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.
+ */
+
+#ifndef _FCNTL_H_
+#define	_FCNTL_H_
+
+#include <sys/fcntl.h>
+
+#endif
diff --git a/include/poll.h b/include/poll.h
new file mode 100644
index 0000000000..9fb5218e35
--- /dev/null
+++ b/include/poll.h
@@ -0,0 +1,37 @@
+/*-
+ * Copyright (c) 2018 The DragonFly Project.  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.
+ * 3. Neither the name of The DragonFly Project nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific, prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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
+ * COPYRIGHT HOLDERS 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.
+ */
+
+#ifndef _POLL_H_
+#define	_POLL_H_
+
+#include <sys/poll.h>
+
+#endif
diff --git a/include/sched.h b/include/sched.h
new file mode 100644
index 0000000000..abc63f1fd2
--- /dev/null
+++ b/include/sched.h
@@ -0,0 +1,37 @@
+/*-
+ * Copyright (c) 2018 The DragonFly Project.  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.
+ * 3. Neither the name of The DragonFly Project nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific, prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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
+ * COPYRIGHT HOLDERS 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.
+ */
+
+#ifndef _SCHED_H_
+#define	_SCHED_H_
+
+#include <sys/sched.h>
+
+#endif
diff --git a/include/semaphore.h b/include/semaphore.h
new file mode 100644
index 0000000000..b06eb35405
--- /dev/null
+++ b/include/semaphore.h
@@ -0,0 +1,37 @@
+/*-
+ * Copyright (c) 2018 The DragonFly Project.  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.
+ * 3. Neither the name of The DragonFly Project nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific, prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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
+ * COPYRIGHT HOLDERS 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.
+ */
+
+#ifndef _SEMAPHORE_H_
+#define	_SEMAPHORE_H_
+
+#include <sys/semaphore.h>
+
+#endif
diff --git a/include/syslog.h b/include/syslog.h
new file mode 100644
index 0000000000..6954b8d6b9
--- /dev/null
+++ b/include/syslog.h
@@ -0,0 +1,37 @@
+/*-
+ * Copyright (c) 2018 The DragonFly Project.  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.
+ * 3. Neither the name of The DragonFly Project nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific, prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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
+ * COPYRIGHT HOLDERS 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.
+ */
+
+#ifndef _SYSLOG_H_
+#define	_SYSLOG_H_
+
+#include <sys/syslog.h>
+
+#endif
diff --git a/include/termios.h b/include/termios.h
new file mode 100644
index 0000000000..f8d9e5e03d
--- /dev/null
+++ b/include/termios.h
@@ -0,0 +1,37 @@
+/*-
+ * Copyright (c) 2018 The DragonFly Project.  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.
+ * 3. Neither the name of The DragonFly Project nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific, prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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
+ * COPYRIGHT HOLDERS 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.
+ */
+
+#ifndef _TERMIOS_H_
+#define	_TERMIOS_H_
+
+#include <sys/termios.h>
+
+#endif
diff --git a/include/ucontext.h b/include/ucontext.h
new file mode 100644
index 0000000000..a0919bba4b
--- /dev/null
+++ b/include/ucontext.h
@@ -0,0 +1,37 @@
+/*-
+ * Copyright (c) 2018 The DragonFly Project.  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.
+ * 3. Neither the name of The DragonFly Project nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific, prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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
+ * COPYRIGHT HOLDERS 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.
+ */
+
+#ifndef _UCONTEXT_H_
+#define	_UCONTEXT_H_
+
+#include <sys/ucontext.h>
+
+#endif
diff --git a/sys/sys/sched.h b/sys/sys/sched.h
index 3f3e3b901f..164839c8f4 100644
--- a/sys/sys/sched.h
+++ b/sys/sys/sched.h
@@ -35,8 +35,8 @@
 
 /* sched.h: POSIX 1003.1b Process Scheduling header */
 
-#ifndef _SCHED_H_
-#define	_SCHED_H_
+#ifndef _SYS_SCHED_H_
+#define	_SYS_SCHED_H_
 
 /* Scheduling policies
  */
@@ -129,4 +129,4 @@ __END_DECLS
 
 #endif
 
-#endif /* _SCHED_H_ */
+#endif /* _SYS_SCHED_H_ */
diff --git a/sys/sys/semaphore.h b/sys/sys/semaphore.h
index badf99f2d5..84ac75e3c0 100644
--- a/sys/sys/semaphore.h
+++ b/sys/sys/semaphore.h
@@ -1,8 +1,3 @@
-#ifndef _SEMAPHORE_H_
-#define _SEMAPHORE_H_
-
-/* semaphore.h: POSIX 1003.1b semaphores */
-
 /*-
  * Copyright (c) 1996, 1997
  *	HD Associates, Inc.  All rights reserved.
@@ -37,6 +32,11 @@
  * $FreeBSD: src/sys/posix4/semaphore.h,v 1.6 2000/01/20 07:55:42 jasone Exp $
  */
 
+/* semaphore.h: POSIX 1003.1b semaphores */
+
+#ifndef _SYS_SEMAPHORE_H_
+#define _SYS_SEMAPHORE_H_
+
 #include <sys/_timespec.h>
 #include <machine/limits.h>
 
@@ -65,4 +65,4 @@ __END_DECLS
 
 #endif
 
-#endif /* _SEMAPHORE_H_ */
+#endif /* _SYS_SEMAPHORE_H_ */
-- 
2.15.0

