Util: Fix build with strndup on some platforms
Jeffrey Pfau jeffrey@endrift.com
Sun, 16 Nov 2014 20:25:52 -0800
1 files changed,
4 insertions(+),
0 deletions(-)
jump to
M
src/util/string.h
→
src/util/string.h
@@ -3,7 +3,11 @@ #define UTIL_STRING_H
#include "util/common.h" +#ifndef strndup +// This is sometimes a macro char* strndup(const char* start, size_t len); +#endif + char* strnrstr(const char* restrict s1, const char* restrict s2, size_t len); #endif