Pārlūkot izejas kodu

Fix linux compilation (pipe2 needs _GNU_SOURCE)

Nick Mathewson 10 gadi atpakaļ
vecāks
revīzija
d850ec8574
1 mainītis faili ar 5 papildinājumiem un 3 dzēšanām
  1. 5 3
      src/common/compat_threads.c

+ 5 - 3
src/common/compat_threads.c

@@ -3,6 +3,8 @@
  * Copyright (c) 2007-2015, The Tor Project, Inc. */
 /* See LICENSE for licensing information */
 
+#define _GNU_SOURCE
+
 #include "orconfig.h"
 #define _GNU_SOURCE
 #include <stdlib.h>
@@ -15,12 +17,12 @@
 #ifdef HAVE_SYS_EVENTFD_H
 #include <sys/eventfd.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
 /** Return a newly allocated, ready-for-use mutex. */
 tor_mutex_t *