[LTP] [PATCH 1/4] lapi/keyctl.h: Remove <keyutils.h>
Petr Vorel
pvorel@suse.cz
Tue Sep 22 18:09:08 CEST 2026
From: Cyril Hrubis <chrubis@suse.cz>
Use only <linux/keyctl.h>. UAPI is stable enough now
+ LTP has struct and functions fallbacks. This simplifies detection.
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Tested-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
[ pvorel: commit message ]
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
include/lapi/keyctl.h | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/include/lapi/keyctl.h b/include/lapi/keyctl.h
index fdb68d1725..92aea858dc 100644
--- a/include/lapi/keyctl.h
+++ b/include/lapi/keyctl.h
@@ -8,17 +8,14 @@
#include "config.h"
-#include <stdint.h>
+#ifdef HAVE_LINUX_KEYCTL_H
+# include <linux/keyctl.h>
+#endif /* HAVE_LINUX_KEYCTL_H */
-#if defined(HAVE_KEYUTILS_H) && defined(HAVE_LIBKEYUTILS)
-# include <keyutils.h>
-#else
-# ifdef HAVE_LINUX_KEYCTL_H
-# include <linux/keyctl.h>
-# endif /* HAVE_LINUX_KEYCTL_H */
+#include <stdarg.h>
+#include <stdint.h>
+#include "lapi/syscalls.h"
-# include <stdarg.h>
-# include "lapi/syscalls.h"
typedef int32_t key_serial_t;
static inline key_serial_t add_key(const char *type,
@@ -59,8 +56,6 @@ static inline key_serial_t keyctl_join_session_keyring(const char *name) {
return keyctl(KEYCTL_JOIN_SESSION_KEYRING, name);
}
-#endif /* defined(HAVE_KEYUTILS_H) && defined(HAVE_LIBKEYUTILS) */
-
#ifndef HAVE_STRUCT_KEYCTL_DH_PARAMS
struct keyctl_dh_params {
int32_t priv;
--
2.55.0
More information about the ltp
mailing list