http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52785
--- Comment #5 from Sérgio Basto <sergio at serjux dot com> 2012-03-30 02:39:25 UTC --- (In reply to comment #4) > strndup is a macro in glibc header files. Use (strndup) to disable the macro > function. > > This is not a GCC bug or a glibc bug (since you supply _GNU_SOURCE which says > define this macro) as the header is using something in the GNU_SOURCE > namespace. Sorry , could you help me try solve this the code is : #ifndef HAVE_STRNDUP extern _X_EXPORT char * strndup(const char *str, size_t n); #endif so -DHAVE_STRNDUP make source compile , what or how I fix the source ?