app-crypt/pgpdump: fix C23 compat

Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James 2024-11-17 02:05:22 +00:00
parent 445d56b1f8
commit d7b8916e46
No known key found for this signature in database
GPG Key ID: 738409F520DF9190
2 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,35 @@
https://github.com/kazu-yamamoto/pgpdump/pull/45
From 541442dc04259bde680b46742522177be40cc065 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Sun, 17 Nov 2024 02:04:03 +0000
Subject: [PATCH] Fix C23 compatibility
C23 removes unprototyped functions, so fix the function pointer type.
---
packet.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/packet.c b/packet.c
index b6f3665..bdd3d3e 100644
--- a/packet.c
+++ b/packet.c
@@ -4,7 +4,7 @@
#include "pgpdump.h"
-typedef void (*funcptr)();
+typedef void (*funcptr)(int);
private int get_new_len(int);
private int is_partial(int);
@@ -91,7 +91,7 @@ TAG[] = {
#define TAG_NUM (sizeof(TAG) * sizeof(string))
private void
-(*tag_func[])() = {
+(*tag_func[])(int) = {
Reserved,
Public_Key_Encrypted_Session_Key_Packet,
Signature_Packet,

View File

@ -17,6 +17,7 @@ RDEPEND="${DEPEND}"
PATCHES=(
"${FILESDIR}"/${PN}-0.32-respect-ldflags.patch
"${FILESDIR}"/${PN}-0.36-c23.patch
)
src_install() {