summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2018-01-02 06:40:55 +0000
committerguenther <guenther@openbsd.org>2018-01-02 06:40:55 +0000
commit9412f04aafef14c47aee05db6f03d0d659e710b3 (patch)
treeccb4568c4c302278911167681677118c7ef696f0
parentStop assuming <sys/file.h> will pull in fcntl.h when _KERNEL is defined. (diff)
downloadwireguard-openbsd-9412f04aafef14c47aee05db6f03d0d659e710b3.tar.xz
wireguard-openbsd-9412f04aafef14c47aee05db6f03d0d659e710b3.zip
Don't #include fcntl.h when _KERNEL is defined.
inspired by FreeBSD r24131 ok millert@ sthen@
-rw-r--r--sys/sys/file.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/sys/file.h b/sys/sys/file.h
index fef8dd0af67..23c2b868531 100644
--- a/sys/sys/file.h
+++ b/sys/sys/file.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.h,v 1.38 2016/08/23 23:28:02 tedu Exp $ */
+/* $OpenBSD: file.h,v 1.39 2018/01/02 06:40:55 guenther Exp $ */
/* $NetBSD: file.h,v 1.11 1995/03/26 20:24:13 jtc Exp $ */
/*
@@ -32,9 +32,10 @@
* @(#)file.h 8.2 (Berkeley) 8/20/94
*/
+#ifndef _KERNEL
#include <sys/fcntl.h>
-#ifdef _KERNEL
+#else /* _KERNEL */
#include <sys/queue.h>
struct proc;