Răsfoiți Sursa

Fix _POSIX_C_SOURCE not defined warning (-Wundef)

Karel Miko 8 ani în urmă
părinte
comite
053996dc5e
3 a modificat fișierele cu 3 adăugiri și 3 ștergeri
  1. 1 1
      demos/constants.c
  2. 1 1
      demos/hashsum.c
  3. 1 1
      demos/sizes.c

+ 1 - 1
demos/constants.c

@@ -8,7 +8,7 @@
  */
 #include "tomcrypt.h"
 
-#if _POSIX_C_SOURCE >= 200112L
+#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L
 #include <libgen.h>
 #else
 #define basename(x) x

+ 1 - 1
demos/hashsum.c

@@ -18,7 +18,7 @@
 
 #include <tomcrypt.h>
 
-#if _POSIX_C_SOURCE >= 200112L
+#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L
 #include <libgen.h>
 #else
 #define basename(x) x

+ 1 - 1
demos/sizes.c

@@ -9,7 +9,7 @@
 
 #include "tomcrypt.h"
 
-#if _POSIX_C_SOURCE >= 200112L
+#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L
 #include <libgen.h>
 #else
 #define basename(x) x