aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-03-21 11:37:28 +0100
committerThomas White <taw@physics.org>2018-03-21 11:37:28 +0100
commit12e5aaa14841a7b6b8b80a1e32a2512354801f10 (patch)
treecb3d357f736d8c2a585f5b776828159621e82c43 /libcrystfel/src
parentf686ee8e039b6145b12bff3420d02784e95d2621 (diff)
Improve/fix tests for clock_gettime and sched_setaffinity
Diffstat (limited to 'libcrystfel/src')
-rw-r--r--libcrystfel/src/thread-pool.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/libcrystfel/src/thread-pool.c b/libcrystfel/src/thread-pool.c
index 6824947c..7ce55d85 100644
--- a/libcrystfel/src/thread-pool.c
+++ b/libcrystfel/src/thread-pool.c
@@ -30,6 +30,10 @@
#include <config.h>
#endif
+#ifdef HAVE_CPU_AFFINITY
+#define _GNU_SOURCE
+#include <sched.h>
+#endif
#include <stdarg.h>
#include <stdlib.h>
@@ -39,11 +43,6 @@
#include <pthread.h>
#include <assert.h>
-#ifdef HAVE_CPU_AFFINITY
-#include <sched.h>
-#endif
-
-
#include "utils.h"