sys-apps/keyutils: Sync with Gentoo

It's from Gentoo commit 6d0c9895fc0f288640588f11ac96c04a7241a95a.

Signed-off-by: Flatcar Buildbot <buildbot@flatcar-linux.org>
This commit is contained in:
Flatcar Buildbot 2026-03-02 07:29:11 +00:00 committed by Krzesimir Nowak
parent 20434d2282
commit 15cacf5d28
2 changed files with 1 additions and 45 deletions

View File

@ -1,43 +0,0 @@
sent upstream
From 1f15000ad21c301a51f7746eb561659348060f45 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@chromium.org>
Date: Wed, 25 Jan 2017 14:06:55 -1000
Subject: [PATCH keyutils] add extern C markings to header file for C++ users
If people try to use keyutils from C++ code, the header doesn't work
properly because the compiler mangles the keyutils symbols. Add the
right extern markings so it works out of the box.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
keyutils.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/keyutils.h b/keyutils.h
index a69fa7aaa11d..d50d19d3e929 100644
--- a/keyutils.h
+++ b/keyutils.h
@@ -15,6 +15,10 @@
#include <sys/types.h>
#include <stdint.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern const char keyutils_version_string[];
extern const char keyutils_build_string[];
@@ -180,4 +184,8 @@ extern int recursive_session_key_scan(recursive_key_scanner_t func, void *data);
extern key_serial_t find_key_by_type_and_desc(const char *type, const char *desc,
key_serial_t destringid);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* KEYUTILS_H */
--
2.11.0

View File

@ -1,4 +1,4 @@
# Copyright 1999-2025 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -21,7 +21,6 @@ DEPEND="!prefix? ( >=sys-kernel/linux-headers-2.6.11 )"
PATCHES=(
"${FILESDIR}"/${PN}-1.6-makefile-fixup.patch
"${FILESDIR}"/${PN}-1.5.10-disable-tests.patch #519062 #522050
"${FILESDIR}"/${PN}-1.5.9-header-extern-c.patch
"${FILESDIR}"/${PN}-1.6.3-fix-rpmspec-check.patch
"${FILESDIR}"/${PN}-1.6.3-symbols.patch
"${FILESDIR}"/${P}-tests.patch