1 From 53a89bfd86fff1a00cc77cabb8457a03eaa3bc7d Mon Sep 17 00:00:00 2001
2 From: Gabi Falk <gabifalk@gmx.com>
3 Date: Fri, 10 May 2024 14:36:12 +0000
4 Subject: [PATCH] bridge/vlan.c: bridge/vlan.c: fix build with gcc 14 on musl
7 On glibc based systems the definition of 'struct timeval' is pulled in
8 with inclusion of <stdlib.h> header, but on musl based systems it
9 doesn't work this way. Missing definition triggers an
10 incompatible-pointer-types error with gcc 14 (warning on previous
13 ../include/json_print.h:80:30: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration
14 80 | _PRINT_FUNC(tv, const struct timeval *)
16 ../include/json_print.h:50:37: note: in definition of macro '_PRINT_FUNC'
19 ../include/json_print.h:80:30: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration
20 80 | _PRINT_FUNC(tv, const struct timeval *)
22 ../include/json_print.h:55:45: note: in definition of macro '_PRINT_FUNC'
25 ../include/json_print.h: In function 'print_tv':
26 ../include/json_print.h:58:48: error: passing argument 5 of 'print_color_tv' from incompatible pointer type [-Wincompatible-pointer-types]
30 | const struct timeval *
32 Signed-off-by: Gabi Falk <gabifalk@gmx.com>
33 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
38 3 files changed, 3 insertions(+)
45 #include <sys/socket.h>
46 +#include <sys/time.h>
48 #include <netinet/in.h>
49 #include <linux/if_bridge.h>
55 #include <sys/socket.h>
56 +#include <sys/time.h>
58 #include <netinet/in.h>
59 #include <linux/if_link.h>
66 +#include <sys/time.h>
67 #include <linux/genetlink.h>
68 #include <linux/if_ether.h>
69 #include <linux/vdpa.h>