aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/errno.h
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2017-03-30 06:24:30 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2017-03-30 06:24:30 +0000
commit836c0dc9e5390cde532621fcb53c13254c09bb5d (patch)
tree3001b6a02467c45c5268f6871b65d1c59f880b04 /sys/sys/errno.h
parent0458b2654a79ea676cda7cd3c5fd1b28c8d96936 (diff)
downloadsrc-836c0dc9e5390cde532621fcb53c13254c09bb5d.tar.gz
src-836c0dc9e5390cde532621fcb53c13254c09bb5d.zip
Only activate __EXT1_VISIBLE block when using sys/errno.h in userspace.
The prerequisite for '#if __EXT1_VISIBLE' functionality is the inclusion of sys/cdefs.h. errno.h only auto-includes the header for non-kernel environment, and EXT1 block only useful for non-kernel as well. Reported by: lwhsu Sponsored by: The FreeBSD Foundation MFC after: 3 weeks
Notes
Notes: svn path=/head/; revision=316258
Diffstat (limited to 'sys/sys/errno.h')
-rw-r--r--sys/sys/errno.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/sys/errno.h b/sys/sys/errno.h
index 7770ee31e2bf..97fe1bdb63db 100644
--- a/sys/sys/errno.h
+++ b/sys/sys/errno.h
@@ -193,6 +193,7 @@ __END_DECLS
#define ERELOOKUP (-5) /* retry the directory lookup */
#endif
+#ifndef _KERNEL
#if __EXT1_VISIBLE
/* ISO/IEC 9899:2011 K.3.2.2 */
#ifndef _ERRNO_T_DEFINED
@@ -200,5 +201,6 @@ __END_DECLS
typedef int errno_t;
#endif
#endif /* __EXT1_VISIBLE */
+#endif
#endif