Commit 70e0e9ed738ddc514b09fa486421fc86c31c7e25

Pádraig Brady 2015-05-27T12:59:05

string: fix build failure on BSD/OSX with FORTIFY_SOURCE This avoids a conflict with "FORTIFY_SOURCE" variants of the string functions when they're replaced on NetBSD-6.0.1 and Darwin-14.3.0 at least. On these platforms, the system <string.h> re-includes "string.h" through <strings.h>, before going on to redefine the "FORTIFY_SOURCE" _chk variants. For example rpl_strncat is redefined to __builtin___strncat_chk. Note strncat is being replaced as the configure check is failing with GCC 4.5.0, due to the builtin strncat failing the check. I.E. when compiled with -O2 the test fails, but passes when -fno-builtin-strncat is also specified. -D_FORTIFY_SOURCE has no impact on the configure test result. * lib/string.in.h: Avoid including our "lib/string.h" while including the system <string.h>.