aboutsummaryrefslogtreecommitdiff
path: root/misc/sys/cdefs.h
diff options
context:
space:
mode:
Diffstat (limited to 'misc/sys/cdefs.h')
-rw-r--r--misc/sys/cdefs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index 7fd41549db..a3c2429b32 100644
--- a/misc/sys/cdefs.h
+++ b/misc/sys/cdefs.h
@@ -304,8 +304,13 @@
/* Forces a function to be always inlined. */
#if __GNUC_PREREQ (3,2)
+/* The Linux kernel defines __always_inline in stddef.h (283d7573), and
+ it conflicts with this definition. Therefore undefine it first to
+ allow either header to be included first. */
+# undef __always_inline
# define __always_inline __inline __attribute__ ((__always_inline__))
#else
+# undef __always_inline
# define __always_inline __inline
#endif