Linux needs -D_GNU_SOURCE for some functions, so enable it in Makefile

next
Michael Stapelberg 2009-02-16 03:35:16 +01:00
parent 6b1069cd47
commit d88c49682f
3 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -10,7 +10,6 @@
* layout.c: Functions handling layout/drawing of window decorations
*
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

View File

@ -8,7 +8,6 @@
* See file LICENSE for license information.
*
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>