public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <petr.vorel@gmail.com>
To: ltp@lists.linux.it
Cc: buildroot@buildroot.org
Subject: [LTP] [RFC PATCH v2 2/3] lapi: Create if_addr.h and reuse it in rtnetlink.h
Date: Thu, 30 Sep 2021 20:30:57 +0200	[thread overview]
Message-ID: <20210930183058.5240-3-petr.vorel@gmail.com> (raw)
In-Reply-To: <20210930183058.5240-1-petr.vorel@gmail.com>

There will be fix in next commit for missing IFA_F_NOPREFIXROUTE which
requires creating lapi/if_addr.h. Thus move IFA_FLAGS to lapi/if_addr.h,
as it belongs there and reuse lapi/if_addr.h in lapi/rtnetlink.h just
like <linux/rtnetlink.h> includes <linux/if_addr.h>.

Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
---
 include/lapi/if_addr.h   | 16 ++++++++++++++++
 include/lapi/rtnetlink.h |  5 +----
 2 files changed, 17 insertions(+), 4 deletions(-)
 create mode 100644 include/lapi/if_addr.h

diff --git a/include/lapi/if_addr.h b/include/lapi/if_addr.h
new file mode 100644
index 000000000..4e50a0a4e
--- /dev/null
+++ b/include/lapi/if_addr.h
@@ -0,0 +1,16 @@
+// 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 <linux/if_addr.h>
+
+#ifndef IFA_FLAGS
+# define IFA_FLAGS 8
+#endif
+
+
+#endif /* LAPI_IF_ADDR_H__ */
diff --git a/include/lapi/rtnetlink.h b/include/lapi/rtnetlink.h
index 04e9ad51a..089bf1a0d 100644
--- a/include/lapi/rtnetlink.h
+++ b/include/lapi/rtnetlink.h
@@ -5,9 +5,6 @@
 # define LAPI_RTNETLINK_H__
 
 #include <linux/rtnetlink.h>
-
-#ifndef IFA_FLAGS
-# define IFA_FLAGS 8
-#endif
+#include "lapi/if_addr.h"
 
 #endif	/* LAPI_RTNETLINK_H__ */
-- 
2.33.0


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

  parent reply	other threads:[~2021-09-30 18:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-30 18:30 [LTP] [RFC PATCH v2 0/3] Fix old toolchain (< v3.14) Petr Vorel
2021-09-30 18:30 ` [LTP] [RFC PATCH v2 1/3] tst_netdevice.c: Drop redundant include Petr Vorel
2021-10-06 13:51   ` Cyril Hrubis
2021-09-30 18:30 ` Petr Vorel [this message]
2021-10-06 13:52   ` [LTP] [RFC PATCH v2 2/3] lapi: Create if_addr.h and reuse it in rtnetlink.h Cyril Hrubis
2021-09-30 18:30 ` [LTP] [RFC PATCH v2 3/3] lapi/if_addr.h: Define IFA_FLAGS Petr Vorel
2021-10-01  9:19   ` Martin Doucha
2021-10-02 17:23     ` Petr Vorel
2021-10-06 14:00   ` Cyril Hrubis
2021-10-06 19:08     ` 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=20210930183058.5240-3-petr.vorel@gmail.com \
    --to=petr.vorel@gmail.com \
    --cc=buildroot@buildroot.org \
    --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