Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Mar 2017 06:24:31 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r316258 - head/sys/sys
Message-ID:  <201703300624.v2U6OV9n011677@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Thu Mar 30 06:24:30 2017
New Revision: 316258
URL: https://svnweb.freebsd.org/changeset/base/316258

Log:
  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

Modified:
  head/sys/sys/errno.h

Modified: head/sys/sys/errno.h
==============================================================================
--- head/sys/sys/errno.h	Thu Mar 30 06:20:58 2017	(r316257)
+++ head/sys/sys/errno.h	Thu Mar 30 06:24:30 2017	(r316258)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703300624.v2U6OV9n011677>