From: Michael Drake Date: Sun, 1 Nov 2015 10:04:47 +0000 (+0000) Subject: Fix build with certain C libraries. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=f15555ee16921352ec00f90e8687b4a17f8195bb;p=libsvgtiny.git Fix build with certain C libraries. --- diff --git a/src/svgtiny_internal.h b/src/svgtiny_internal.h index 0fd5af9..542a0d0 100644 --- a/src/svgtiny_internal.h +++ b/src/svgtiny_internal.h @@ -71,7 +71,7 @@ void svgtiny_parse_transform(char *s, float *ma, float *mb, struct svgtiny_shape *svgtiny_add_shape(struct svgtiny_parse_state *state); void svgtiny_transform_path(float *p, unsigned int n, struct svgtiny_parse_state *state); -#if defined(_GNU_SOURCE) +#if (defined(_GNU_SOURCE) && !defined(__APPLE__) || defined(__amigaos4__) || defined(__HAIKU__) || (defined(_POSIX_C_SOURCE) && ((_POSIX_C_SOURCE - 0) >= 200809L))) #define HAVE_STRNDUP #else #undef HAVE_STRNDUP