Don't build with -ansi by default

This commit is contained in:
bixiaoyan 2024-02-23 17:32:37 +08:00
parent 52a7bbe352
commit 50bb801fcd
2 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,28 @@
From 09560af2a5cb3db08fe428906c0af76bf09594f0 Mon Sep 17 00:00:00 2001
From: Christine Caulfield <ccaulfie@redhat.com>
Date: Mon, 29 Jan 2024 08:41:23 +0000
Subject: [PATCH] Don't build with -ansi by default
-ansi restricts the code to C90 standard which can break some
included headers (specifically seen on freebsd-devel), so don't
make it the default.
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 67b9ddd3..e05de3a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -186,7 +186,7 @@ AC_SUBST(PKGNAME)
AC_ARG_ENABLE([ansi],
[ --enable-ansi force GCC to compile to ANSI/ANSI standard for older compilers.
- [default=yes]])
+ [default=no]])
AC_ARG_ENABLE([fatal-warnings],
[ --enable-fatal-warnings very pedantic and fatal warnings for gcc
--
2.25.1

View File

@ -1,7 +1,7 @@
Name: resource-agents Name: resource-agents
Summary: Open Source HA Reusable Cluster Resource Scripts Summary: Open Source HA Reusable Cluster Resource Scripts
Version: 4.13.0 Version: 4.13.0
Release: 6 Release: 7
License: GPLv2+ and LGPLv2+ License: GPLv2+ and LGPLv2+
URL: https://github.com/ClusterLabs/resource-agents URL: https://github.com/ClusterLabs/resource-agents
Source0: https://github.com/ClusterLabs/resource-agents/archive/v%{version}.tar.gz Source0: https://github.com/ClusterLabs/resource-agents/archive/v%{version}.tar.gz
@ -11,6 +11,7 @@ Patch0002: fix-loopback-handling.patch
Patch0003: fix-handler-out-of-scope-leak.patch Patch0003: fix-handler-out-of-scope-leak.patch
Patch0004: fix-uninitialized-value-covscan-error.patch Patch0004: fix-uninitialized-value-covscan-error.patch
Patch0005: Avoid-false-positive-for-VG-activation.patch Patch0005: Avoid-false-positive-for-VG-activation.patch
Patch0006: Don-t-build-with-ansi-by-default.patch
Obsoletes: heartbeat-resources <= %{version} Obsoletes: heartbeat-resources <= %{version}
Provides: heartbeat-resources = %{version} Provides: heartbeat-resources = %{version}
BuildRequires: automake autoconf pkgconfig gcc perl-interpreter perl-generators python3-devel BuildRequires: automake autoconf pkgconfig gcc perl-interpreter perl-generators python3-devel
@ -108,6 +109,9 @@ export CFLAGS="$(echo '%{optflags}')"
%{_mandir}/man8/{ocf-tester.8*,ldirectord.8*} %{_mandir}/man8/{ocf-tester.8*,ldirectord.8*}
%changelog %changelog
* Fri Feb 23 2024 bixiaoyan <bixiaoyan@kylinos.cn> - 4.13.0-7
- Don't build with -ansi by default
* Fri Feb 23 2024 bixiaoyan <bixiaoyan@kylinos.cn> - 4.13.0-6 * Fri Feb 23 2024 bixiaoyan <bixiaoyan@kylinos.cn> - 4.13.0-6
- LVM-activate: Avoid false positive for VG activation - LVM-activate: Avoid false positive for VG activation