From 5c77aa56dc5d95475d433b5c67fb2b066fc4a19a Mon Sep 17 00:00:00 2001 From: Stefan Sayer Date: Fri, 24 Sep 2010 03:39:56 +0200 Subject: [PATCH] on linux,define _GNU_SOURCE before including stdio --- core/amci/amci.h | 3 +++ core/log.h | 2 ++ core/plug-in/speex/speex.c | 7 ++++--- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/core/amci/amci.h b/core/amci/amci.h index 29f3e623..0d68a27f 100644 --- a/core/amci/amci.h +++ b/core/amci/amci.h @@ -35,6 +35,9 @@ extern "C" { #endif +#ifdef __linux +#define _GNU_SOURCE +#endif #include /** diff --git a/core/log.h b/core/log.h index 48696183..9d16be6a 100644 --- a/core/log.h +++ b/core/log.h @@ -67,7 +67,9 @@ enum Log_Level { #endif #ifdef __linux +# define _GNU_SOURCE # include +# include # define GET_PID() syscall(__NR_gettid) #else # define GET_PID() getpid() diff --git a/core/plug-in/speex/speex.c b/core/plug-in/speex/speex.c index 04107547..da206c80 100644 --- a/core/plug-in/speex/speex.c +++ b/core/plug-in/speex/speex.c @@ -17,14 +17,15 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include -#include - #include "amci.h" #include "codecs.h" #include "speex/speex.h" #include "../../log.h" +#include +#include +#include + /* Speex constants */ #define SPEEX_FRAME_MS 20 #define SPEEX_NB_SAMPLES_PER_FRAME 160