From 636ceed7aa134ffd60bc950026e742ae873711ab Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Tue, 26 Dec 2023 14:13:56 -0500 Subject: [PATCH] Fix for https://fedoraproject.org/wiki/Changes/PortingToModernC https://github.com/opendnssec/opendnssec/pull/853 --- opendnssec-implicit-declarations.patch | 48 ++++++++++++++++++++++++++ opendnssec.spec | 2 ++ 2 files changed, 50 insertions(+) create mode 100644 opendnssec-implicit-declarations.patch diff --git a/opendnssec-implicit-declarations.patch b/opendnssec-implicit-declarations.patch new file mode 100644 index 0000000..c2a6aed --- /dev/null +++ b/opendnssec-implicit-declarations.patch @@ -0,0 +1,48 @@ +From 7060607ef359162d5b0aef62a4b8440fd42c9d28 Mon Sep 17 00:00:00 2001 +From: Yaakov Selkowitz +Date: Tue, 26 Dec 2023 14:09:12 -0500 +Subject: [PATCH] Fix implicit function declarations +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +utils/kaspcheck.c:101:33: error: implicit declaration of function ‘exit’ +utils/kaspcheck.c:136:17: error: implicit declaration of function ‘free’ +utils/kc_helper.c:47:40: error: implicit declaration of function ‘free’ +utils/kc_helper.c:519:85: error: implicit declaration of function ‘atoi’ +utils/kc_helper.c:569:83: error: implicit declaration of function ‘malloc’ +utils/kc_helper.c:1122:28: error: implicit declaration of function ‘strtol’ +utils/kc_helper.c:1274:25: error: implicit declaration of function ‘exit’ +utils/kc_helper.c:1375:21: error: implicit declaration of function ‘calloc’ +--- + enforcer/src/utils/kaspcheck.c | 1 + + enforcer/src/utils/kc_helper.c | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/enforcer/src/utils/kaspcheck.c b/enforcer/src/utils/kaspcheck.c +index 9bac3b796..b3b808598 100644 +--- a/enforcer/src/utils/kaspcheck.c ++++ b/enforcer/src/utils/kaspcheck.c +@@ -26,6 +26,7 @@ + #define _GNU_SOURCE + #include + #include ++#include + #include + #include + +diff --git a/enforcer/src/utils/kc_helper.c b/enforcer/src/utils/kc_helper.c +index 89e56c61e..e1704f6f9 100644 +--- a/enforcer/src/utils/kc_helper.c ++++ b/enforcer/src/utils/kc_helper.c +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + #include + #include + #include +-- +2.43.0 + diff --git a/opendnssec.spec b/opendnssec.spec index 4db1d5e..f68283d 100644 --- a/opendnssec.spec +++ b/opendnssec.spec @@ -20,6 +20,7 @@ Patch1: 0001-Pass-right-remaining-buffer-size-in-hsm_hex_unparse-.patch Patch2: opendnssec-configure-c99.patch Patch3: opendnssec-c99-1.patch Patch4: opendnssec-c99-2.patch +Patch5: opendnssec-implicit-declarations.patch Requires: opencryptoki, softhsm >= 2.5.0 , systemd-units Requires: libxml2, libxslt sqlite @@ -53,6 +54,7 @@ name server. It requires a PKCS#11 crypto module library, such as softhsm %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch -P5 -p1 # Prevent re-running autoconf. touch -r aclocal.m4 configure* m4/*