From 0f5b3b47ac407540e1d762381a5bc73dee663542763af9335bfa3517b77ecf87 Mon Sep 17 00:00:00 2001 From: Martin Wilck Date: Tue, 25 Aug 2020 15:07:11 +0000 Subject: [PATCH] * Spec file: Add --std=gnu99 to fix compilation on SLE12 OBS-URL: https://build.opensuse.org/package/show/Base:System/multipath-tools?expand=0&rev=224 --- multipath-tools.changes | 1 + multipath-tools.spec | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/multipath-tools.changes b/multipath-tools.changes index 974b10b..d5f9e0e 100644 --- a/multipath-tools.changes +++ b/multipath-tools.changes @@ -4,6 +4,7 @@ Fri Aug 21 22:28:33 UTC 2020 - mwilck@suse.com - Update to version 0.8.4+170+suse.801341f: * libmultipath: tests: fix bitfield tests * Spec file: disable LTO for %check (bsc#1133122) + * Spec file: Add --std=gnu99 to fix compilation on SLE12 ------------------------------------------------------------------- Thu Aug 20 19:20:59 UTC 2020 - mwilck@suse.com diff --git a/multipath-tools.spec b/multipath-tools.spec index cbc32eb..57f999a 100644 --- a/multipath-tools.spec +++ b/multipath-tools.spec @@ -158,14 +158,14 @@ cp %{SOURCE4} . [ -n "$SOURCE_DATE_EPOCH" ] && export KBUILD_BUILD_TIMESTAMP=@$SOURCE_DATE_EPOCH # %%make_build is not supported in SLE12 %{?make_build}%{!?make_build:make %{?_smp_mflags}} \ - CC="%__cc" OPTFLAGS="%{optflags}" %{dirflags} %{makeflags} + CC="%__cc" OPTFLAGS="--std=gnu99 %{optflags}" %{dirflags} %{makeflags} %if 0%{?with_check} == 1 %check # ld fails to resolve cmocka's __wrap symbols with -flto # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88643 %define _lto_cflags %{nil} -make OPTFLAGS="%{optflags}" %{_make_output_sync} %{?_smp_mflags} test +make OPTFLAGS="--std=gnu99 %{optflags}" %{_make_output_sync} %{?_smp_mflags} test %endif %install