aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core
diff options
context:
space:
mode:
authorGravatar David Klempner <klempner@imsanet.org>2015-02-04 10:18:59 -0800
committerGravatar David Klempner <klempner@imsanet.org>2015-02-04 10:18:59 -0800
commit78b79920afbdc87284c49fc27358d2854ae8fe9c (patch)
tree7e5d1969c241556cef74e130a4d2118771dc61b6 /test/core
parent78d1fd07d27a2ac28eca792933e052cb1fe1fa17 (diff)
Fix up feature test macros
Move all feature test macros to the start of the file and check that they aren't already defined or defined to a lower value than the file needs. Projects should be allowed to put these in CFLAGS and we shouldn't break when they do.
Diffstat (limited to 'test/core')
-rw-r--r--test/core/echo/echo_test.c3
-rw-r--r--test/core/fling/fling_stream_test.c3
-rw-r--r--test/core/fling/fling_test.c3
3 files changed, 9 insertions, 0 deletions
diff --git a/test/core/echo/echo_test.c b/test/core/echo/echo_test.c
index 83b83ab7ff..5450dfbef5 100644
--- a/test/core/echo/echo_test.c
+++ b/test/core/echo/echo_test.c
@@ -31,7 +31,10 @@
*
*/
+#ifndef _POSIX_SOURCE
#define _POSIX_SOURCE
+#endif
+
#include <unistd.h>
#include <assert.h>
#include <stdio.h>
diff --git a/test/core/fling/fling_stream_test.c b/test/core/fling/fling_stream_test.c
index 7f52fb1bad..1db2f1a791 100644
--- a/test/core/fling/fling_stream_test.c
+++ b/test/core/fling/fling_stream_test.c
@@ -31,7 +31,10 @@
*
*/
+#ifndef _POSIX_SOURCE
#define _POSIX_SOURCE
+#endif
+
#include <unistd.h>
#include <assert.h>
#include <stdio.h>
diff --git a/test/core/fling/fling_test.c b/test/core/fling/fling_test.c
index b2272f20c8..4f41a21aaa 100644
--- a/test/core/fling/fling_test.c
+++ b/test/core/fling/fling_test.c
@@ -31,7 +31,10 @@
*
*/
+#ifndef _POSIX_SOURCE
#define _POSIX_SOURCE
+#endif
+
#include <unistd.h>
#include <assert.h>
#include <stdio.h>