[LTP] [PATCH v2 01/33] lapi/keyctl.h: Add fallback definitions for extended ops

Cyril Hrubis chrubis@suse.cz
Fri Sep 11 09:31:29 CEST 2026


Hi!
> --- a/m4/ltp-keyutils.m4
> +++ b/m4/ltp-keyutils.m4
> @@ -7,4 +7,17 @@ AC_DEFUN([LTP_CHECK_KEYUTILS_SUPPORT], [
>  	AC_CHECK_LIB([keyutils], [add_key],
>  	[AC_DEFINE(HAVE_LIBKEYUTILS, 1, [Define to 1 if you have libkeyutils installed.])
>  	      AC_SUBST(KEYUTILS_LIBS, "-lkeyutils")])
> +
> +	LTP_KEYCTL_HEADERS=""
> +
> +	if test "x$ac_cv_header_keyutils_h" = "xyes" && \
> +	   test "x$ac_cv_lib_keyutils_add_key" = "xyes"; then
> +		LTP_KEYCTL_HEADERS="#include <keyutils.h>"
> +	elif test "x$ac_cv_header_linux_keyctl_h" = "xyes"; then
> +		LTP_KEYCTL_HEADERS="#include <linux/keyctl.h>"
> +	fi
> +
> +	AC_CHECK_TYPES([struct keyctl_dh_params, struct keyctl_kdf_params,
> +			struct keyctl_pkey_query, struct keyctl_pkey_params],,,
> +			[$LTP_KEYCTL_HEADERS])
>  ])

Maybe we can simplify this to just linux/keyctl.h. The linux uapi header
has been quite stable for nearly a decade.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list