From: Helge Deller <deller@gmx.de>
Fixes this warning:
Unknown host IFA type: 11
IFA_PROTO has been introduced in kernel v5.18, and as such using it
unconditionally breaks build on Ubuntu 22.04. Instead convert the IFA_XXX
values to QEMU_IDA_XXX values and use those instead.
Already existing IFA_XXX usages are converted to QEMU_IFA_XXX in a
followup-patch.
Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/fd-trans.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/linux-user/fd-trans.c b/linux-user/fd-trans.c
index c04a97c73a..05a944b32e 100644
--- a/linux-user/fd-trans.c
+++ b/linux-user/fd-trans.c
@@ -31,6 +31,22 @@
#include "fd-trans.h"
#include "signal-common.h"
+enum {
+ QEMU_IFA_UNSPEC,
+ QEMU_IFA_ADDRESS,
+ QEMU_IFA_LOCAL,
+ QEMU_IFA_LABEL,
+ QEMU_IFA_BROADCAST,
+ QEMU_IFA_ANYCAST,
+ QEMU_IFA_CACHEINFO,
+ QEMU_IFA_MULTICAST,
+ QEMU_IFA_FLAGS,
+ QEMU_IFA_RT_PRIORITY,
+ QEMU_IFA_TARGET_NETNSID,
+ QEMU_IFA_PROTO,
+ QEMU__IFA__MAX,
+};
+
enum {
QEMU_IFLA_BR_UNSPEC,
QEMU_IFLA_BR_FORWARD_DELAY,
@@ -1140,6 +1156,7 @@ static abi_long host_to_target_data_addr_rtattr(struct
rtattr *rtattr)
/* binary: depends on family type */
case IFA_ADDRESS:
case IFA_LOCAL:
+ case QEMU_IFA_PROTO:
break;
/* string */
case IFA_LABEL: