Index: include/sys/cdefs.h =================================================================== --- include/sys/cdefs.h +++ include/sys/cdefs.h @@ -323,8 +323,9 @@ /* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 inline semantics, unless -fgnu89-inline is used. */ -#if (!defined __cplusplus || __GNUC_PREREQ (4,3)) && defined __GNUC__ -# if defined __GNUC_STDC_INLINE__ || defined __cplusplus +#ifdef __GNUC__ +# if defined __GNUC_STDC_INLINE__ || \ + (defined __cplusplus && defined __GNUC_GNU_INLINE__) # define __extern_inline extern __inline __attribute__ ((__gnu_inline__)) # if __GNUC_PREREQ (4,3) # define __extern_always_inline \ @@ -342,10 +343,6 @@ # define __extern_always_inline extern __always_inline # endif # endif -#elif defined __GNUC__ /* C++ and GCC <4.3. */ -# define __extern_inline extern __inline -# define __extern_always_inline \ - extern __always_inline #else /* Not GCC. */ # define __extern_inline /* Ignore */ # define __extern_always_inline /* Ignore */