aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Germain <b n t DOT g e r m a i n AT g m a i l DOT c o m>2019-04-22 14:10:23 +0200
committerBenoit Germain <b n t DOT g e r m a i n AT g m a i l DOT c o m>2019-04-22 14:10:23 +0200
commitb735db9ef342973deb628129fc04f0d295616164 (patch)
tree19311340dbedbe37a60606a3004ef650a2d1925d
parentaa09497c677727a3a756004d163d1d480dbff726 (diff)
downloadlanes-b735db9ef342973deb628129fc04f0d295616164.tar.gz
lanes-b735db9ef342973deb628129fc04f0d295616164.tar.bz2
lanes-b735db9ef342973deb628129fc04f0d295616164.zip
Fix _GNU_SOURCE redefinition (#171)
-rw-r--r--src/threading.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/threading.c b/src/threading.c
index 1eab52f..f1720eb 100644
--- a/src/threading.c
+++ b/src/threading.c
@@ -1,6 +1,6 @@
1/* 1/*
2 * THREADING.C Copyright (c) 2007-08, Asko Kauppi 2 * THREADING.C Copyright (c) 2007-08, Asko Kauppi
3 * Copyright (C) 2009-14, Benoit Germain 3 * Copyright (C) 2009-19, Benoit Germain
4 * 4 *
5 * Lua Lanes OS threading specific code. 5 * Lua Lanes OS threading specific code.
6 * 6 *
@@ -35,12 +35,17 @@ THE SOFTWARE.
35=============================================================================== 35===============================================================================
36*/ 36*/
37#if defined(__linux__) 37#if defined(__linux__)
38# define _GNU_SOURCE /* must be defined before any include */ 38
39# ifndef _GNU_SOURCE // definition by the makefile can cause a redefinition error
40# define _GNU_SOURCE // must be defined before any include
41# endif // _GNU_SOURCE
42
39# ifdef __ANDROID__ 43# ifdef __ANDROID__
40# include <android/log.h> 44# include <android/log.h>
41# define LOG_TAG "LuaLanes" 45# define LOG_TAG "LuaLanes"
42# endif 46# endif // __ANDROID__
43#endif 47
48#endif // __linux__
44 49
45#include <stdio.h> 50#include <stdio.h>
46#include <stdlib.h> 51#include <stdlib.h>