File dmenu-optflags.patch of Package dmenu

Index: dmenu-4.9/config.mk
===================================================================
--- dmenu-4.9.orig/config.mk
+++ dmenu-4.9/config.mk
@@ -23,9 +23,10 @@ INCS = -I$(X11INC) -I$(FREETYPEINC)
 LIBS = -L$(X11LIB) -lX11 $(XINERAMALIBS) $(FREETYPELIBS)
 
 # flags
-CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\" $(XINERAMAFLAGS)
-CFLAGS   = -std=c99 -pedantic -Wall -Os $(INCS) $(CPPFLAGS)
-LDFLAGS  = $(LIBS)
+CPPFLAGS += -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" $(XINERAMAFLAGS)
+CFLAGS   := $(CFLAGS) -Wall $(INCS) $(CPPFLAGS)
+LDFLAGS  += $(LIBS)
+
 
 # compiler and linker
 CC = cc
Index: dmenu-4.9/Makefile
===================================================================
--- dmenu-4.9.orig/Makefile
+++ dmenu-4.9/Makefile
@@ -23,10 +23,10 @@ config.h:
 $(OBJ): arg.h config.h config.mk drw.h
 
 dmenu: dmenu.o drw.o util.o
-	$(CC) -o $@ dmenu.o drw.o util.o $(LDFLAGS)
+	$(CC) $(CFLAGS) -o $@ dmenu.o drw.o util.o $(LDFLAGS)
 
 stest: stest.o
-	$(CC) -o $@ stest.o $(LDFLAGS)
+	$(CC) $(CFLAGS) -o $@ stest.o $(LDFLAGS)
 
 clean:
 	rm -f dmenu stest $(OBJ) dmenu-$(VERSION).tar.gz
openSUSE Build Service is sponsored by