From e9e9dec33aebe8d6be32008661c9b2fc47b67cb7 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 3 Feb 2023 16:35:08 +0100 Subject: [PATCH] Fix C99 compatibility issue Related to: --- passt-c99.patch | 18 ++++++++++++++++++ passt.spec | 8 ++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 passt-c99.patch diff --git a/passt-c99.patch b/passt-c99.patch new file mode 100644 index 0000000..7bd2f09 --- /dev/null +++ b/passt-c99.patch @@ -0,0 +1,18 @@ +Avoid an implicit int, to prevent build failures with future compilers. + +Submitted upstream: + + +diff --git a/Makefile b/Makefile +index 1dc2df5884d3b597..cd62900e7406e155 100644 +--- a/Makefile ++++ b/Makefile +@@ -95,7 +95,7 @@ ifeq ($(shell :|$(CC) -fstack-protector-strong -S -xc - -o - >/dev/null 2>&1; ec + FLAGS += -fstack-protector-strong + endif + +-C := \#define _GNU_SOURCE\n\#include \nx = FALLOC_FL_COLLAPSE_RANGE; ++C := \#define _GNU_SOURCE\n\#include \nint x = FALLOC_FL_COLLAPSE_RANGE; + ifeq ($(shell printf "$(C)" | $(CC) -S -xc - -o - >/dev/null 2>&1; echo $$?),0) + EXTRA_SYSCALLS += fallocate + endif diff --git a/passt.spec b/passt.spec index 9191fc6..4c575e6 100644 --- a/passt.spec +++ b/passt.spec @@ -11,12 +11,13 @@ Name: passt Version: 0^20221116.gace074c -Release: 2%{?dist} +Release: 3%{?dist} Summary: User-mode networking daemons for virtual machines and namespaces License: AGPLv3+ and BSD Group: System Environment/Daemons URL: https://passt.top/ Source: https://passt.top/passt/snapshot/passt-%{git_hash}.tar.xz +Patch0: passt-c99.patch BuildRequires: gcc, make, checkpolicy, selinux-policy-devel @@ -45,7 +46,7 @@ Requires(preun): policycoreutils This package adds SELinux enforcement to passt(1) and pasta(1). %prep -%setup -q -n passt-%{git_hash} +%autosetup -p1 -n passt-%{git_hash} %build %set_build_flags @@ -96,6 +97,9 @@ semodule -r pasta 2>/dev/null || : %{_datadir}/selinux/packages/%{name}/pasta.pp %changelog +* Fri Feb 03 2023 Florian Weimer - 0^20221116.gace074c-3 +- Fix C99 compatibility issue + * Thu Jan 19 2023 Fedora Release Engineering - 0^20221116.gace074c-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild