summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2021-03-19 03:47:23 +0100
committerBruno Haible <bruno@clisp.org>2021-03-19 03:47:23 +0100
commitd1e7d49d2cde9b9d80cfe52aea7ccb63a4f45391 (patch)
treebddf5492d73e36cd8d7e5eb1580aeb885cbef713 /tests
parent2b2e2c1ca7181597631351965b7a20a01c850476 (diff)
downloadgnulib-d1e7d49d2cde9b9d80cfe52aea7ccb63a4f45391.tar.gz
simple-atomic tests: Fix compilation error on Solaris 10.
Reported by Tom G. Christensen <tgc@jupiterrise.com> in <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00085.html>. * tests/test-simple-atomic.c (yield): Define only after all #includes.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-simple-atomic.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test-simple-atomic.c b/tests/test-simple-atomic.c
index 04baf054b1..e30506a141 100644
--- a/tests/test-simple-atomic.c
+++ b/tests/test-simple-atomic.c
@@ -34,17 +34,17 @@
implementation. */
#define REPEAT_COUNT 1000
+#include "glthread/thread.h"
+#include "glthread/yield.h"
+
+#include "macros.h"
+
#if EXPLICIT_YIELD
# define yield() gl_thread_yield ()
#else
# define yield()
#endif
-#include "glthread/thread.h"
-#include "glthread/yield.h"
-
-#include "macros.h"
-
/* Counters for each thread. */
static unsigned int counter[THREAD_COUNT][5];