aboutsummaryrefslogtreecommitdiff
path: root/cddl/compat
diff options
context:
space:
mode:
authorRobert Millan <rmh@FreeBSD.org>2012-04-30 23:12:16 +0000
committerRobert Millan <rmh@FreeBSD.org>2012-04-30 23:12:16 +0000
commite851fbe3de003aceab88e5153a057cd786613c7f (patch)
treefb6b46c08fcc6c4e9f4b16c8afc6483d5d830726 /cddl/compat
parentb3f67bed164ec85ba6d718b4c637668b6e0b2417 (diff)
downloadsrc-e851fbe3de003aceab88e5153a057cd786613c7f.tar.gz
src-e851fbe3de003aceab88e5153a057cd786613c7f.zip
GNU/kFreeBSD portability fix. This glue <stdlib.h> overrides header protection
in the system-wide version of <stdlib.h> by wrapping the #include_next <stdlib.h> within the scope of its own header protection. On FreeBSD this has no effect, since both header protections are equivalent. However the GNU version of <stdlib.h> implements a special header protection mechanism which allows it to be included multiple times (in different modes). Simply by moving the #include_next off the header protection, we allow system-wide <stdlib.h> to implement its own protection policy, whichever that may be.
Notes
Notes: svn path=/head/; revision=234856
Diffstat (limited to 'cddl/compat')
-rw-r--r--cddl/compat/opensolaris/include/stdlib.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/cddl/compat/opensolaris/include/stdlib.h b/cddl/compat/opensolaris/include/stdlib.h
index 4e21ea6280ae..9ba32322c03b 100644
--- a/cddl/compat/opensolaris/include/stdlib.h
+++ b/cddl/compat/opensolaris/include/stdlib.h
@@ -27,11 +27,11 @@
*
*/
+#include_next <stdlib.h>
+
#ifndef _COMPAT_OPENSOLARIS_STDLIB_H_
#define _COMPAT_OPENSOLARIS_STDLIB_H_
-#include_next <stdlib.h>
-
#define getexecname getprogname
#endif