mmc-utils: restore FORTIFY_SOURCE=2
authorDaniel Golle <daniel@makrotopia.org>
Thu, 2 Apr 2015 20:18:05 +0000 (22:18 +0200)
committerMichael Heimpold <mhei@heimpold.de>
Fri, 3 Apr 2015 20:17:07 +0000 (22:17 +0200)
The previous commit
ba4338d mmc-utils: don't set -D_FORTIFY_SOURCE in Makefile
applied the global value of FORITFY_SOURCE also to mmc-utils.
As the package was meant to be built with FORTIFY_SOURCE upstream,
restore that behaviour and make it play nice with the global setting
by undefining the macro before defining it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
utils/mmc-utils/patches/001-dont-set-fortify-source-in-makefile.patch [deleted file]
utils/mmc-utils/patches/001-properly-set-fortify-source-in-makefile.patch [new file with mode: 0644]

diff --git a/utils/mmc-utils/patches/001-dont-set-fortify-source-in-makefile.patch b/utils/mmc-utils/patches/001-dont-set-fortify-source-in-makefile.patch
deleted file mode 100644 (file)
index 9b2b8ba..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-Index: mmc-utils-f4eb241519f8d500ce6068a70d2389be39ac5189/Makefile
-===================================================================
---- mmc-utils-f4eb241519f8d500ce6068a70d2389be39ac5189.orig/Makefile
-+++ mmc-utils-f4eb241519f8d500ce6068a70d2389be39ac5189/Makefile
-@@ -1,5 +1,5 @@
- CC ?= gcc
--AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-+AM_CFLAGS = -D_FILE_OFFSET_BITS=64
- CFLAGS ?= -g -O2
- objects = \
-       mmc.o \
diff --git a/utils/mmc-utils/patches/001-properly-set-fortify-source-in-makefile.patch b/utils/mmc-utils/patches/001-properly-set-fortify-source-in-makefile.patch
new file mode 100644 (file)
index 0000000..4a35b95
--- /dev/null
@@ -0,0 +1,11 @@
+Index: mmc-utils-f4eb241519f8d500ce6068a70d2389be39ac5189/Makefile
+===================================================================
+--- mmc-utils-f4eb241519f8d500ce6068a70d2389be39ac5189.orig/Makefile
++++ mmc-utils-f4eb241519f8d500ce6068a70d2389be39ac5189/Makefile
+@@ -1,5 +1,5 @@
+ CC ?= gcc
+-AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
++AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
+ CFLAGS ?= -g -O2
+ objects = \
+       mmc.o \