]> git.sur5r.net Git - i3/i3/commitdiff
Linux needs -D_GNU_SOURCE for some functions, so enable it in Makefile
authorMichael Stapelberg <michael+git@stapelberg.de>
Mon, 16 Feb 2009 02:35:16 +0000 (03:35 +0100)
committerMichael Stapelberg <michael+git@stapelberg.de>
Mon, 16 Feb 2009 02:35:16 +0000 (03:35 +0100)
Makefile
src/layout.c
src/mainx.c

index 28b7a6369ac5b191ed5006c46b4234d975321078..06388cb9c0ce7af3dfb11e338f0fa4340b8ff245 100644 (file)
--- 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
index a3b87f176ef15ad695c0cbc92b7d0f578d917b99..48fcaf3691fbe8cf81bd2be89c7ae7281e0a091d 100644 (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>
index 70a0f8197ddfb86d72a776bd0c09951c943ed70f..b8a8da19fbda6ebd6165e4aca366fe93dd3fef85 100644 (file)
@@ -8,7 +8,6 @@
  * See file LICENSE for license information.
  *
  */
-#define _GNU_SOURCE
 #include <stdio.h>
 #include <assert.h>
 #include <stdlib.h>