1From b13440627bd4a9f060a33d400a47a40daa2bc12e Mon Sep 17 00:00:00 2001 2From: Petr Vorel <petr.vorel@gmail.com> 3Date: Wed, 29 Sep 2021 19:37:19 +0200 4Subject: [PATCH] lapi: Create if_addr.h and reuse it in rtnetlink.h 5 6There will be fix in next commit for missing IFA_F_NOPREFIXROUTE which 7requires creating lapi/if_addr.h. Thus move IFA_FLAGS to lapi/if_addr.h, 8as it belongs there and reuse lapi/if_addr.h in lapi/rtnetlink.h just 9like <linux/rtnetlink.h> includes <linux/if_addr.h>. 10 11Signed-off-by: Petr Vorel <petr.vorel@gmail.com> 12[ upstream status: https://lore.kernel.org/ltp/20210930183058.5240-3-petr.vorel@gmail.com/T/#u ] 13--- 14 include/lapi/if_addr.h | 16 ++++++++++++++++ 15 include/lapi/rtnetlink.h | 5 +---- 16 2 files changed, 17 insertions(+), 4 deletions(-) 17 create mode 100644 include/lapi/if_addr.h 18 19diff --git a/include/lapi/if_addr.h b/include/lapi/if_addr.h 20new file mode 100644 21index 000000000..4e50a0a4e 22--- /dev/null 23+++ b/include/lapi/if_addr.h 24@@ -0,0 +1,16 @@ 25+// SPDX-License-Identifier: GPL-2.0-or-later 26+/* 27+ * Copyright (c) 2021 Petr Vorel <petr.vorel@gmail.com> 28+ */ 29+ 30+#ifndef LAPI_IF_ADDR_H__ 31+#define LAPI_IF_ADDR_H__ 32+ 33+#include <linux/if_addr.h> 34+ 35+#ifndef IFA_FLAGS 36+# define IFA_FLAGS 8 37+#endif 38+ 39+ 40+#endif /* LAPI_IF_ADDR_H__ */ 41diff --git a/include/lapi/rtnetlink.h b/include/lapi/rtnetlink.h 42index 04e9ad51a..089bf1a0d 100644 43--- a/include/lapi/rtnetlink.h 44+++ b/include/lapi/rtnetlink.h 45@@ -5,9 +5,6 @@ 46 # define LAPI_RTNETLINK_H__ 47 48 #include <linux/rtnetlink.h> 49- 50-#ifndef IFA_FLAGS 51-# define IFA_FLAGS 8 52-#endif 53+#include "lapi/if_addr.h" 54 55 #endif /* LAPI_RTNETLINK_H__ */ 56-- 572.33.0 58 59