]> wimlib.net Git - wimlib/blobdiff - src/util.c
portability and compression cleanups
[wimlib] / src / util.c
index 6e9ae23e993f4e4977247195a38d7afeee676ec5..3b13c503f04095beda6646a849c6185f3ad7ed37 100644 (file)
 #  include "config.h"
 #endif
 
+/* Make sure the POSIX-compatible strerror_r() is declared, rather than the GNU
+ * version, which has a different return type. */
 #ifdef _GNU_SOURCE
 #  define _GNU_SOURCE_DEFINED 1
 #  undef _GNU_SOURCE
+#  ifndef _POSIX_C_SOURCE
+#    define _POSIX_C_SOURCE 200112L
+#  endif
 #endif
-/* Make sure the POSIX-compatible strerror_r() is declared, rather than the GNU
- * version, which has a different return type. */
 #include <string.h>
 #ifdef _GNU_SOURCE_DEFINED
 #  define _GNU_SOURCE