From: Gabi Falk <gabifalk@gmx.com>
To: netdev@vger.kernel.org
Cc: Gabi Falk <gabifalk@gmx.com>
Subject: [PATCH iproute2] bridge/vlan.c: fix build with gcc 14 on musl systems
Date: Fri, 10 May 2024 14:23:45 +0000 [thread overview]
Message-ID: <20240510142346.1508152-1-gabifalk@gmx.com> (raw)
On glibc based systems the definition of 'struct timeval' is pulled in
with inclusion of <stdlib.h> header, but on musl based systems it
doesn't work this way. Missing definition triggers an
incompatible-pointer-types error with gcc 14 (warning on previous
versions of gcc):
../include/json_print.h:80:30: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration
80 | _PRINT_FUNC(tv, const struct timeval *)
| ^~~~~~~
../include/json_print.h:50:37: note: in definition of macro '_PRINT_FUNC'
50 | type value); \
| ^~~~
../include/json_print.h:80:30: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration
80 | _PRINT_FUNC(tv, const struct timeval *)
| ^~~~~~~
../include/json_print.h:55:45: note: in definition of macro '_PRINT_FUNC'
55 | type value) \
| ^~~~
../include/json_print.h: In function 'print_tv':
../include/json_print.h:58:48: error: passing argument 5 of 'print_color_tv' from incompatible pointer type [-Wincompatible-pointer-types]
58 | value); \
| ^~~~~
| |
| const struct timeval *
Link: https://bugs.gentoo.org/922622
Signed-off-by: Gabi Falk <gabifalk@gmx.com>
---
bridge/vlan.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/bridge/vlan.c b/bridge/vlan.c
index 5352eb24..0a7e6c45 100644
--- a/bridge/vlan.c
+++ b/bridge/vlan.c
@@ -4,6 +4,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <sys/socket.h>
+#include <sys/time.h>
#include <net/if.h>
#include <netinet/in.h>
#include <linux/if_bridge.h>
--
gabi
next reply other threads:[~2024-05-10 14:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-10 14:23 Gabi Falk [this message]
2024-05-10 14:36 ` [PATCH v2 iproute2] bridge/vlan.c: bridge/vlan.c: fix build with gcc 14 on musl systems Gabi Falk
2024-05-14 5:30 ` patchwork-bot+netdevbpf
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=20240510142346.1508152-1-gabifalk@gmx.com \
--to=gabifalk@gmx.com \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).