From bedf5a3bc8cc7f62dccdc40a2fe37e7d47064c89e33b5d38891fb86d268c57b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20M=C3=BCller?= Date: Sat, 17 Mar 2012 20:08:07 +0000 Subject: [PATCH] Disable format-security and missing-format-attribute warnings via CFLAGS on pre-11.2 systems. OBS-URL: https://build.opensuse.org/package/show/server:mail/exim?expand=0&rev=118 --- exim.changes | 6 ++++++ exim.spec | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/exim.changes b/exim.changes index d8acf4b..2aaae29 100644 --- a/exim.changes +++ b/exim.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Mar 17 19:42:30 UTC 2012 - lars@samba.org + +- Disable format-security and missing-format-attribute warnings via CFLAGS on + pre-11.2 systems. + ------------------------------------------------------------------- Wed Mar 7 16:13:51 UTC 2012 - lars@samba.org diff --git a/exim.spec b/exim.spec index 22f4841..bd80075 100644 --- a/exim.spec +++ b/exim.spec @@ -16,6 +16,7 @@ # + Name: exim BuildRequires: db-devel BuildRequires: openldap2-devel @@ -125,6 +126,9 @@ once, if at all. The rest is done by logrotate / cron.) fPIE="-fPIE" pie="-pie" %endif +%if %{?suse_version:%suse_version}%{?!suse_version:99999} > 1100 +CFALGS_OPT_WERROR="-Werror=format-security -Werror=missing-format-attribute" +%endif cat <<-EOF > Local/Makefile # see src/EDITME for comments. BIN_DIRECTORY=/usr/sbin @@ -231,7 +235,7 @@ cat <<-EOF > Local/Makefile # SPOOL_MODE=0640 SUPPORT_MOVE_FROZEN_MESSAGES=yes HAVE_IPV6=YES - CFLAGS=$RPM_OPT_FLAGS -Wall -Werror=format-security -Werror=missing-format-attribute -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DLDAP_DEPRECATED $fPIE + CFLAGS=$RPM_OPT_FLAGS -Wall $CFALGS_OPT_WERROR -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DLDAP_DEPRECATED $fPIE EXTRALIBS=-ldl -L/usr/X11R6/%{_lib} $pie EOF touch Local/eximon.conf