https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61649
--- Comment #3 from Richard PALO <richard at netbsd dot org> --- No. Prior to fixincludes, sys/feature_tests.h in SunOS looks like the following: #if (defined(__STDC__) && defined(_STDC_C99)) #define _RESTRICT_KYWD restrict #else #define _RESTRICT_KYWD #endif Illumos has since https://www.illumos.org/issues/2941 the following: #if (defined(__STDC__) && defined(_STDC_C99)) && !defined(__cplusplus) #define _RESTRICT_KYWD restrict #else #define _RESTRICT_KYWD #endif The net effect of my patch is to support both variants in producing the following: #if (defined(__STDC__) && defined(_STDC_C99)) #ifdef __cplusplus #define _RESTRICT_KYWD __restrict #else #define _RESTRICT_KYWD restrict #endif #else #define _RESTRICT_KYWD #endif