Avoid implicit declaration of rpmFreeCrypto

Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
This commit is contained in:
Florian Weimer 2022-11-28 11:58:06 +01:00
parent ada077c995
commit 49f103321f
2 changed files with 26 additions and 1 deletions

View File

@ -0,0 +1,19 @@
Include <rpmpgp.h> for the rpmFreeCrypto function, to avoid an
implicit function declaration.
Submitted upstream:
<https://github.com/linux-application-whitelisting/fapolicyd/pull/212>
diff --git a/src/library/rpm-backend.c b/src/library/rpm-backend.c
index e5c5f3318285fd4b..6122ef1bf6623522 100644
--- a/src/library/rpm-backend.c
+++ b/src/library/rpm-backend.c
@@ -30,6 +30,7 @@
#include <rpm/rpmmacro.h>
#include <rpm/rpmlog.h>
#include <rpm/rpmdb.h>
+#include <rpm/rpmpgp.h>
#include <fnmatch.h>
#include <uthash.h>

View File

@ -5,7 +5,7 @@
Summary: Application Whitelisting Daemon
Name: fapolicyd
Version: 1.1.7
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv3+
URL: http://people.redhat.com/sgrubb/fapolicyd
Source0: https://people.redhat.com/sgrubb/fapolicyd/%{name}-%{version}.tar.gz
@ -31,6 +31,7 @@ Requires(preun): systemd-units
Requires(postun): systemd-units
Patch1: fapolicyd-uthash-bundle.patch
Patch2: fapolicyd-rpm-backend-c99.patch
%description
Fapolicyd (File Access Policy Daemon) implements application whitelisting
@ -64,6 +65,8 @@ The %{name}-selinux package contains selinux policy for the %{name} daemon.
%patch1 -p1 -b .uthash
%endif
%patch2 -p1 -b .c99
# generate rules for python
sed -i "s/%python2_path%/`readlink -f %{__python2} | sed 's/\//\\\\\//g'`/g" rules.d/*.rules
sed -i "s/%python3_path%/`readlink -f %{__python3} | sed 's/\//\\\\\//g'`/g" rules.d/*.rules
@ -204,6 +207,9 @@ fi
%selinux_relabel_post -s %{selinuxtype}
%changelog
* Mon Nov 28 2022 Florian Weimer <fweimer@redhat.com> - 1.1.7-2
- Avoid implicit declaration of rpmFreeCrypto
* Mon Nov 28 2022 Radovan Sroka <rsroka@redhat.com> - 1.1.7.1
- rebase fapolicyd to v1.1.7 and fapolicyd-selinux to v0.5