public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 1/1] lapi: Add missing IFA_FLAGS
Date: Fri, 14 May 2021 09:45:53 +0200	[thread overview]
Message-ID: <YJ4qsVYYYfW3lldj@yuki> (raw)
In-Reply-To: <20210514080630.11273-1-pvorel@suse.cz>

Hi!
>  configure.ac             |  1 +
>  include/lapi/rtnetlink.h | 17 +++++++++++++++++
>  lib/tst_netdevice.c      |  3 ++-
>  3 files changed, 20 insertions(+), 1 deletion(-)
>  create mode 100644 include/lapi/rtnetlink.h
> 
> diff --git a/configure.ac b/configure.ac
> index 136d82d09..95c6d2e72 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -59,6 +59,7 @@ AC_CHECK_HEADERS_ONCE([ \
>      linux/mempolicy.h \
>      linux/module.h \
>      linux/netlink.h \
> +    linux/rtnetlink.h \

I wonder if this is really needed, if that header is not present we will
have to add much more stuff to lapi/rtnetlink.h, so I would just avoid
configure check here.

>      linux/seccomp.h \
>      linux/securebits.h \
>      linux/tty.h \
> diff --git a/include/lapi/rtnetlink.h b/include/lapi/rtnetlink.h
> new file mode 100644
> index 000000000..d1dc53df8
> --- /dev/null
> +++ b/include/lapi/rtnetlink.h
> @@ -0,0 +1,17 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +/* Copyright (c) 2021 Petr Vorel <petr.vorel@gmail.com> */
> +
> +#ifndef LAPI_IF_ADDR_H__
> +# define LAPI_IF_ADDR_H__
> +
> +#include "config.h"
> +
> +#ifdef HAVE_LINUX_RTNETLINK_H
> +# include <linux/rtnetlink.h>
> +#endif
> +
> +#ifndef IFA_FLAGS
> +# define IFA_FLAGS 8
> +#endif
> +
> +#endif	/* LAPI_IF_ADDR_H__ */
> diff --git a/lib/tst_netdevice.c b/lib/tst_netdevice.c
> index 5ca523759..d098173d5 100644
> --- a/lib/tst_netdevice.c
> +++ b/lib/tst_netdevice.c
> @@ -5,10 +5,11 @@
>  
>  #include <asm/types.h>
>  #include <linux/netlink.h>
> -#include <linux/rtnetlink.h>
>  #include <linux/veth.h>
>  #include <sys/socket.h>
>  #include <net/if.h>
> +#include "lapi/rtnetlink.h"
> +
>  #define TST_NO_DEFAULT_MAIN
>  #include "tst_test.h"
>  #include "tst_rtnetlink.h"
> -- 
> 2.31.1
> 

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2021-05-14  7:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-14  8:06 [LTP] [PATCH v2 1/1] lapi: Add missing IFA_FLAGS Petr Vorel
2021-05-14  7:45 ` Cyril Hrubis [this message]
2021-05-14  8:55   ` 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=YJ4qsVYYYfW3lldj@yuki \
    --to=chrubis@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox