]> git.ipfire.org Git - thirdparty/systemd.git/commit
meson: fix BPF build warnings due to MS extensions
authorHaiyue Wang <haiyuewa@163.com>
Wed, 17 Dec 2025 08:02:31 +0000 (16:02 +0800)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 17 Dec 2025 12:58:33 +0000 (12:58 +0000)
commit568fe0294ddf273a6036fec6a4e9a962c036b5b4
tree2be8cfcb25909ae0552f1fc09acdddd2ab795c6e
parent0927356f8e53f363cf080d69274a44b4a7c90ad6
meson: fix BPF build warnings due to MS extensions

Fix BPF program build warnings on Linux-6.19.0-rc1, more detail is [1]:

A). clang-bpf

[781/2458] Generating src/network/bpf/sysctl-monitor/sysctl-monitor.bpf.unstripped.o with a custom command
In file included from ../src/network/bpf/sysctl-monitor/sysctl-monitor.bpf.c:3:
./vmlinux.h:60263:3: warning: declaration does not declare anything [-Wmissing-declarations]
 60263 |                 struct ns_tree;
       |                 ^~~~~~~~~~~~~~
./vmlinux.h:80251:2: warning: declaration does not declare anything [-Wmissing-declarations]
 80251 |         struct __fs_path;
       |         ^~~~~~~~~~~~~~~~
./vmlinux.h:96184:2: warning: declaration does not declare anything [-Wmissing-declarations]
 96184 |         struct freelist_tid;
       |         ^~~~~~~~~~~~~~~~~~~
./vmlinux.h:114441:2: warning: declaration does not declare anything [-Wmissing-declarations]
 114441 |         struct renamedata;
        |         ^~~~~~~~~~~~~~~~~
./vmlinux.h:118480:2: warning: declaration does not declare anything [-Wmissing-declarations]
 118480 |         union pipe_index;
        |         ^~~~~~~~~~~~~~~~
./vmlinux.h:130452:4: warning: declaration does not declare anything [-Wmissing-declarations]
 130452 |                         struct freelist_counters;
        |                         ^~~~~~~~~~~~~~~~~~~~~~~~
6 warnings generated.

B). gcc-bpf

meson setup -Dbpf-compiler=gcc build

[1040/2458] Generating src/network/bpf/sysctl-monitor/sysctl-monitor.bpf.unstripped.o with a custom command
In file included from ../src/network/bpf/sysctl-monitor/sysctl-monitor.bpf.c:3:
./vmlinux.h:60263:31: warning: declaration does not declare anything
60263 |                 struct ns_tree;
      |                               ^
./vmlinux.h:80251:25: warning: declaration does not declare anything
80251 |         struct __fs_path;
      |                         ^
./vmlinux.h:96184:28: warning: declaration does not declare anything
96184 |         struct freelist_tid;
      |                            ^
./vmlinux.h:114441:26: warning: declaration does not declare anything
114441 |         struct renamedata;
       |                          ^
./vmlinux.h:118480:25: warning: declaration does not declare anything
118480 |         union pipe_index;
       |                         ^
./vmlinux.h:130452:49: warning: declaration does not declare anything
130452 |                         struct freelist_counters;
       |                                                 ^

[1] https://git.kernel.org/torvalds/c/639f58a0f480
    "bpftool: Fix build warnings due to MS extensions"

Signed-off-by: Haiyue Wang <haiyuewa@163.com>
meson.build