Move _GNU_SOURCE to gmxpre.h
[alexxy/gromacs.git] / src / gromacs / gmxlib / gmx_thread_affinity.c
index 69e256fbca94283f969d57c9f7473f63103b940d..75e277999be1fcef991d5d14a30d2456a8449214 100644 (file)
  */
 #include "gmxpre.h"
 
-#include "config.h"
-
-#ifdef HAVE_SCHED_AFFINITY
-#  ifndef _GNU_SOURCE
-#    define _GNU_SOURCE 1
-#  endif
-#  include <sched.h>
-#  include <sys/syscall.h>
-#endif
-
 #include "gromacs/legacyheaders/gmx_thread_affinity.h"
 
+#include "config.h"
+
 #include <assert.h>
 #include <errno.h>
 #include <stdio.h>
 #include <string.h>
 
+#ifdef HAVE_SCHED_AFFINITY
+#  include <sched.h>
+#  include <sys/syscall.h>
+#endif
+
 #include "thread_mpi/threads.h"
 
 #include "gromacs/legacyheaders/copyrite.h"