]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Improvement from @inikep 537/head
authorNick Terrell <terrelln@fb.com>
Thu, 9 Feb 2017 22:20:52 +0000 (14:20 -0800)
committerNick Terrell <terrelln@fb.com>
Thu, 9 Feb 2017 22:20:52 +0000 (14:20 -0800)
programs/platform.h

index b54b94d7525ae7bdd35d3787aebe2fefaf88abd2..def8945bdd6e4d4ea899d4061c2ab33dfc461826 100644 (file)
@@ -77,10 +77,9 @@ extern "C" {
 #    define PLATFORM_POSIX_VERSION 200112L
 #  else
 #    if defined(__linux__) || defined(__linux)
-#      ifdef _POSIX_C_SOURCE
-#        undef _POSIX_C_SOURCE
+#      ifndef _POSIX_C_SOURCE
+#        define _POSIX_C_SOURCE 200112L  /* use feature test macro */
 #      endif
-#      define _POSIX_C_SOURCE 200112L  /* use feature test macro */
 #    endif
 #    include <unistd.h>  /* declares _POSIX_VERSION */
 #    if defined(_POSIX_VERSION)  /* POSIX compliant */