http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57025
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-04-21 15:09:48 UTC --- Those libraries are incompatible with C++ then, the C++ standard allows __STDC_VERSION to be defined by a C++ compiler. The libraries could be fixed by also checking !defined(__cplusplus), or you could #define restrict __restrict before including them.