From e32f1a1cce806f60541d6fe127d48a415f721e80 Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Mon, 27 Nov 2023 04:25:07 +0100 Subject: [PATCH] fix implicit declarations due to missing include --- openscap-1.3.9-includes.patch | 33 +++++++++++++++++++++++++++++++++ openscap.spec | 4 +++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 openscap-1.3.9-includes.patch diff --git a/openscap-1.3.9-includes.patch b/openscap-1.3.9-includes.patch new file mode 100644 index 0000000..e314e89 --- /dev/null +++ b/openscap-1.3.9-includes.patch @@ -0,0 +1,33 @@ +diff -ru openscap-1.3.9/src/common/xml_iterate.c openscap-1.3.9.new/src/common/xml_iterate.c +--- openscap-1.3.9/src/common/xml_iterate.c 2023-09-06 16:04:46.000000000 +0200 ++++ openscap-1.3.9.new/src/common/xml_iterate.c 2023-11-27 03:13:21.931933518 +0100 +@@ -22,6 +22,7 @@ + #endif + + #include ++#include + #include "debug_priv.h" + #include "xml_iterate.h" + #include "oscap_helpers.h" +diff -ru openscap-1.3.9/src/OVAL/results/oval_cmp_evr_string.c openscap-1.3.9.new/src/OVAL/results/oval_cmp_evr_string.c +--- openscap-1.3.9/src/OVAL/results/oval_cmp_evr_string.c 2023-09-06 16:04:46.000000000 +0200 ++++ openscap-1.3.9.new/src/OVAL/results/oval_cmp_evr_string.c 2023-11-27 03:18:23.003882498 +0100 +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + #include "oval_cmp_evr_string_impl.h" + #include "oval_definitions.h" + #include "oval_types.h" +diff -ru openscap-1.3.9/src/source/bz2.c openscap-1.3.9.new/src/source/bz2.c +--- openscap-1.3.9/src/source/bz2.c 2023-09-06 16:04:46.000000000 +0200 ++++ openscap-1.3.9.new/src/source/bz2.c 2023-11-27 03:32:20.069323771 +0100 +@@ -26,6 +26,7 @@ + #endif + + #include ++#include + #include + #include + #ifdef OS_WINDOWS diff --git a/openscap.spec b/openscap.spec index 1336506..0a78b87 100644 --- a/openscap.spec +++ b/openscap.spec @@ -19,6 +19,9 @@ Source0: https://github.com/OpenSCAP/%{name}/releases/download/%{version} Patch1: openscap-1.3.9-perlpath.patch +# Implicit declarations due to missing includes +Patch2: openscap-1.3.9-includes.patch + BuildRequires: make BuildRequires: cmake >= 2.6 BuildRequires: gcc @@ -168,7 +171,6 @@ Tool for scanning Atomic containers. %build # gconf is a legacy system not used any more, and it blocks testing of oscap-anaconda-addon # as gconf is no longer part of the installation medium -export CFLAGS="$CFLAGS -Wno-error=implicit-function-declaration" %cmake \ -DWITH_PCRE2=ON \ -DENABLE_PERL=ON \