aboutsummaryrefslogtreecommitdiff
path: root/src/common/compat_threads.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-09-25 23:25:02 -0400
committerNick Mathewson <nickm@torproject.org>2015-01-14 11:09:51 -0500
commitd850ec8574761c0279df53f3b7a9811d1dab430f (patch)
tree9564547159ba12b59afb35327123a046d8147525 /src/common/compat_threads.c
parent74b782645ad89b8bd5a18fd3f2cb3be45c38a04f (diff)
downloadtor-d850ec8574761c0279df53f3b7a9811d1dab430f.tar.gz
tor-d850ec8574761c0279df53f3b7a9811d1dab430f.zip
Fix linux compilation (pipe2 needs _GNU_SOURCE)
Diffstat (limited to 'src/common/compat_threads.c')
-rw-r--r--src/common/compat_threads.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/common/compat_threads.c b/src/common/compat_threads.c
index 648eaa2d80..ba48eb4d1f 100644
--- a/src/common/compat_threads.c
+++ b/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 *