summaryrefslogtreecommitdiffstats
path: root/sys/sys/cdefs.h
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2015-04-12 16:43:55 +0000
committerpfg <pfg@FreeBSD.org>2015-04-12 16:43:55 +0000
commitb226379a0c8e267e6335075cd06e0cfce561b583 (patch)
tree52a41d3206e00787b8f737c792fb7987bb3f4287 /sys/sys/cdefs.h
parent7a032b3c8107453f7a1ed3e1520c6e142abc8dcd (diff)
downloadFreeBSD-src-b226379a0c8e267e6335075cd06e0cfce561b583.zip
FreeBSD-src-b226379a0c8e267e6335075cd06e0cfce561b583.tar.gz
Add definition for the gcc gnu_inline attribute.
This uses a non-standard (who would guess that) inlining method that is useful for legacy GNU software. This attribute was added in GCC 4.1.3. Older versions of clang would just ignore the attribute but as lately it is supported also there. This is currently unused but it is required for the FORTIFY_SOURCE extension.
Diffstat (limited to 'sys/sys/cdefs.h')
-rw-r--r--sys/sys/cdefs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
index fa0caa5..553a899 100644
--- a/sys/sys/cdefs.h
+++ b/sys/sys/cdefs.h
@@ -375,8 +375,10 @@
#endif
#if __GNUC_PREREQ__(4, 1)
+#define __gnu_inline __attribute__((__gnu_inline__))
#define __returns_twice __attribute__((__returns_twice__))
#else
+#define __gnu_inline
#define __returns_twice
#endif
OpenPOWER on IntegriCloud