public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Sergei Trofimovich <slyich@gmail.com>
To: netdev@vger.kernel.org
Cc: Sergei Trofimovich <slyich@gmail.com>
Subject: [PATCH iproute2] include/json_print.h: add includes for `__u32` and `timeval` declarations
Date: Mon, 23 Feb 2026 22:34:35 +0000	[thread overview]
Message-ID: <20260223223435.289652-1-slyich@gmail.com> (raw)

Without the change the build fails on `musl` as:

```
../include/json_print.h:100:44: error: unknown type name ‘__u32’
  100 | unsigned int print_range(const char *name, __u32 start, __u32 end);
      |                                            ^~~~~
...
../include/json_print.h:82:30: warning: ‘struct timeval’ declared inside parameter list will not be visible outside of this definition or declaration
   82 | _PRINT_FUNC(tv, const struct timeval *)
      |                              ^~~~~~~
../include/json_print.h:57:45: note: in definition of macro ‘_PRINT_FUNC’
   57 |                                             type value)                 \
      |                                             ^~~~
../include/json_print.h: In function ‘print_tv’:
../include/json_print.h:60:48: error: passing argument 5 of ‘print_color_tv’ from incompatible pointer type [-Wincompatible-pointer-types]
   60 |                                                value);                  \
      |                                                ^~~~~
      |                                                |
      |                                                const struct timeval *
```
---
 include/json_print.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/json_print.h b/include/json_print.h
index 59edd5b2..c0d6315f 100644
--- a/include/json_print.h
+++ b/include/json_print.h
@@ -8,6 +8,10 @@
 #ifndef _JSON_PRINT_H_
 #define _JSON_PRINT_H_
 
+#include <sys/time.h> /* struct timeval typedef */
+
+#include <asm/types.h> /* __u32 typedef */
+
 #include "json_writer.h"
 #include "color.h"
 
-- 
2.52.0


             reply	other threads:[~2026-02-23 22:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-23 22:34 Sergei Trofimovich [this message]
2026-02-28  1:10 ` [PATCH iproute2] include/json_print.h: add includes for `__u32` and `timeval` declarations 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=20260223223435.289652-1-slyich@gmail.com \
    --to=slyich@gmail.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