From d88c49682f78318ac03ae49c7dddd47a606bfb2a Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Mon, 16 Feb 2009 03:35:16 +0100 Subject: [PATCH] Linux needs -D_GNU_SOURCE for some functions, so enable it in Makefile --- Makefile | 4 ++++ src/layout.c | 1 - src/mainx.c | 1 - 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 28b7a636..06388cb9 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,10 @@ CFLAGS += -I/usr/pkg/include LDFLAGS += -Wl,-rpath,/usr/local/lib -Wl,-rpath,/usr/pkg/lib endif +ifeq ($(UNAME),Linux) +CFLAGS += -D_GNU_SOURCE +endif + ifeq ($(DEBUG),1) # Extended debugging flags, macros shall be available in gcc CFLAGS += -gdwarf-2 diff --git a/src/layout.c b/src/layout.c index a3b87f17..48fcaf36 100644 --- a/src/layout.c +++ b/src/layout.c @@ -10,7 +10,6 @@ * layout.c: Functions handling layout/drawing of window decorations * */ -#define _GNU_SOURCE #include #include #include diff --git a/src/mainx.c b/src/mainx.c index 70a0f819..b8a8da19 100644 --- a/src/mainx.c +++ b/src/mainx.c @@ -8,7 +8,6 @@ * See file LICENSE for license information. * */ -#define _GNU_SOURCE #include #include #include