All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] lapi/keyctl.h: Fix compilation on old kernel
@ 2026-09-21 11:14 Petr Vorel
  2026-09-21 11:52 ` Cyril Hrubis
  2026-09-21 13:46 ` [LTP] " linuxtestproject.agent
  0 siblings, 2 replies; 6+ messages in thread
From: Petr Vorel @ 2026-09-21 11:14 UTC (permalink / raw)
  To: ltp; +Cc: linuxtestproject.agent

priv member was added in kernel v4.20 (which we still support) in commit
2ecefa0a15fd0 ("keys: Fix the use of the C++ keyword "private" in
uapi/linux/keyctl.h")

Use macro definition to fix missing 'priv' in the old UAPI headers. This
fixes error:

    keyctl25.c:25:11: error: ‘struct keyctl_dh_params’ has no member named ‘priv’

Fixes: ee02118e9f ("lapi/keyctl.h: Add fallback definitions for extended ops")
Suggested-by: linuxtestproject.agent@gmail.com
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Yet another pre-release fix, required for compilation on SLE12-SP5.

Kind regards,
Petr

 include/lapi/keyctl.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/lapi/keyctl.h b/include/lapi/keyctl.h
index fdb68d1725..e1e46b7865 100644
--- a/include/lapi/keyctl.h
+++ b/include/lapi/keyctl.h
@@ -69,6 +69,12 @@ struct keyctl_dh_params {
 };
 #endif
 
+/* Fix for kernel < v4.20 */
+#if defined(HAVE_STRUCT_KEYCTL_DH_PARAMS) && \
+	!defined(HAVE_STRUCT_KEYCTL_DH_PARAMS_PRIV)
+# define priv private
+#endif
+
 #ifndef HAVE_STRUCT_KEYCTL_KDF_PARAMS
 struct keyctl_kdf_params {
 	char *hashname;
-- 
2.55.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-09-22  8:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-21 11:14 [LTP] [PATCH 1/1] lapi/keyctl.h: Fix compilation on old kernel Petr Vorel
2026-09-21 11:52 ` Cyril Hrubis
2026-09-21 13:36   ` Petr Vorel
2026-09-21 13:41     ` Petr Vorel
2026-09-22  8:55       ` Petr Vorel
2026-09-21 13:46 ` [LTP] " linuxtestproject.agent

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.