Bug 20215: Always undefine __always_inline before defining it.
authorCarlos O'Donell <carlos@redhat.com>
Fri, 10 Jun 2016 18:40:38 +0000 (14:40 -0400)
committerCarlos O'Donell <carlos@redhat.com>
Fri, 10 Jun 2016 19:09:12 +0000 (15:09 -0400)
The Linux kernel defines __always_inline in stddef.h (283d7573),
and it conflicts with the definition in misc/sys/cdefs.h.  To fix
this we undefine it first and always use the glibc definition.

ChangeLog
misc/sys/cdefs.h

index 34f51b5..fd2ea8a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-06-09  Carlos O'Donell  <carlos@redhat.com>
+
+       [BZ #20215]
+       * misc/sys/cdefs.h [__GNUC_PREREQ (3,2)]: Undef __always_inline first.
+       [!__GNUC_PREREQ (3,2)]: Likewise.
+
 2016-06-10  Adhemerval Zanela  <adhemerval.zanella@linaro.org>
 
        * conform/data/sys/socket.h-data (msghdr.msg_iovlen): Add xfail-.
index 7fd4154..a3c2429 100644 (file)
 
 /* 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