From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] tst_af_alg: fix build error when ALG_SET_AEAD_ASSOCLEN undefined
Date: Fri, 28 Aug 2020 10:43:34 +0200 [thread overview]
Message-ID: <20200828084334.GA1648@dell5510> (raw)
In-Reply-To: <1598005119-2147-1-git-send-email-xuyang2018.jy@cn.fujitsu.com>
Hi,
> configure.ac | 6 ++++++
> include/lapi/if_alg.h | 39 ++++++++++++++++++++++++++++++---------
> 2 files changed, 36 insertions(+), 9 deletions(-)
> diff --git a/configure.ac b/configure.ac
> index 382963d8b..f711ac123 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -193,6 +193,12 @@ AC_CHECK_TYPES([struct xt_entry_match, struct xt_entry_target],,,[
> #include <linux/netfilter_ipv4/ip_tables.h>
> ])
> +AC_CHECK_TYPES([struct sockaddr_alg, struct af_alg_iv],,,[
> +#ifdef HAVE_LINUX_IF_ALG_H
> +# include <linux/if_alg.h>
> +#endif
> +])
nit: This list was meant to be sorted. I'll handle that during merge.
> +
> # Tools knobs
> # Expect
> diff --git a/include/lapi/if_alg.h b/include/lapi/if_alg.h
> index 5a74df99b..9c04a444c 100644
> --- a/include/lapi/if_alg.h
> +++ b/include/lapi/if_alg.h
> @@ -8,9 +8,10 @@
> #ifdef HAVE_LINUX_IF_ALG_H
> # include <linux/if_alg.h>
> -#else
> +#endif
> # include <stdint.h>
BTW <stdint.h> is needed only for "#ifndef HAVE_STRUCT_SOCKADDR_ALG" and "#ifndef
HAVE_STRUCT_AF_ALG_IVL" (for uint*_t) but we can ignore that as a detail (better
than have complicated guarder:
#if ! (defined(HAVE_STRUCT_SOCKADDR_ALG) && defined(HAVE_STRUCT_AF_ALG_IVL)
(and later forgot to update it).
> +#ifndef HAVE_STRUCT_SOCKADDR_ALG
> struct sockaddr_alg {
> uint16_t salg_family;
> uint8_t salg_type[14];
> @@ -18,21 +19,41 @@ struct sockaddr_alg {
> uint32_t salg_mask;
> uint8_t salg_name[64];
> };
> +#endif
The rest lgtm:
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
next prev parent reply other threads:[~2020-08-28 8:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-21 10:18 [LTP] [PATCH] tst_af_alg: fix build error when ALG_SET_AEAD_ASSOCLEN undefined Yang Xu
2020-08-28 8:43 ` Petr Vorel [this message]
2020-08-28 9:27 ` Yang Xu
2020-08-28 8:48 ` Petr Vorel
2020-08-28 9:34 ` Yang Xu
2020-08-28 10:33 ` Petr Vorel
2020-08-28 10:40 ` Petr Vorel
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=20200828084334.GA1648@dell5510 \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
/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.