All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it, linuxtestproject.agent@gmail.com
Subject: Re: [LTP] [PATCH v2 1/2] keyctl: Vendor struct keyctl_dh_params
Date: Tue, 22 Sep 2026 16:03:02 +0200	[thread overview]
Message-ID: <arKKloQVzHXo4Vs_@yuki.lan> (raw)
In-Reply-To: <arKIz5Oygb57INup@yuki.lan>

Hi!
> I think that we should simplify this by including only
> include/linux/keyctl.h and do not ever include the include/keyutils.h
> from keyutils package.
> 
> This should do the trick:
> 
> diff --git a/include/lapi/keyctl.h b/include/lapi/keyctl.h
> index fdb68d172..90ebf88c1 100644
> --- a/include/lapi/keyctl.h
> +++ b/include/lapi/keyctl.h
> @@ -10,15 +10,13 @@
> 
>  #include <stdint.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 "lapi/syscalls.h"
> +#ifdef HAVE_LINUX_KEYCTL_H
> +# include <linux/keyctl.h>
> +#endif /* HAVE_LINUX_KEYCTL_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,11 +57,12 @@ 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;
> +       union {
> +               int32_t priv;
> +               int32_t private;
> +       };
>         int32_t prime;
>         int32_t base;
>  };

And of course we have to change the ->priv to ->private to get the
tests compiled on older distributions as well.

-- 
Cyril Hrubis
chrubis@suse.cz

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

  reply	other threads:[~2026-09-22 14:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-22  9:51 [LTP] [PATCH v2 1/2] keyctl: Vendor struct keyctl_dh_params Petr Vorel
2026-09-22  9:51 ` [LTP] [PATCH v2 2/2] autotools: Move into configure.ac Petr Vorel
2026-09-22 13:55 ` [LTP] [PATCH v2 1/2] keyctl: Vendor struct keyctl_dh_params Cyril Hrubis
2026-09-22 14:03   ` Cyril Hrubis [this message]
2026-09-22 15:14     ` Petr Vorel
2026-09-22 15:20       ` Cyril Hrubis
2026-09-22 14:39   ` Petr Vorel
2026-09-22 15:48   ` Petr Vorel
2026-09-22 16:15     ` Petr Vorel
2026-09-22 14:29 ` [LTP] " linuxtestproject.agent

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=arKKloQVzHXo4Vs_@yuki.lan \
    --to=chrubis@suse.cz \
    --cc=linuxtestproject.agent@gmail.com \
    --cc=ltp@lists.linux.it \
    --cc=pvorel@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.