From 747271e97b5500d0a9fdfc641b36a199e313c3f0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 29 Oct 2019 16:16:42 +0200 Subject: Adjust _POSIX_C_SOURCE definition to work around musl bug --- libpkgconf/libpkgconf/config.h.in | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'libpkgconf/libpkgconf/config.h.in') diff --git a/libpkgconf/libpkgconf/config.h.in b/libpkgconf/libpkgconf/config.h.in index ac5b1fa..3005e5a 100644 --- a/libpkgconf/libpkgconf/config.h.in +++ b/libpkgconf/libpkgconf/config.h.in @@ -19,13 +19,15 @@ #define PACKAGE_VERSION "$PACKAGE_VERSION$" /* - * strndup() is not present on Windows, for gcc and clang if compile with - * -std=C99, except for FreeBSD and MacOS. + * strndup() is not present on Windows while strl*() are only present on + * FreeBSD and MacOS. * - * strl*() are only present on FreeBSD and MacOS. */ -#if defined(__FreeBSD__) || defined(__APPLE__) +#if !defined(_WIN32) # define HAVE_STRNDUP 1 +#endif + +#if defined(__FreeBSD__) || defined(__APPLE__) # define HAVE_STRLCPY 1 # define HAVE_STRLCAT 1 #endif -- cgit v1.1