Re: [PATCH bpf v1] selftests/bpf: Fix error compiling cgroup_ancestor.c with musl libc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello:

This patch was applied to bpf/bpf.git (master)
by Alexei Starovoitov <ast@xxxxxxxxxx>:

On Tue,  8 Oct 2024 16:12:32 -0700 you wrote:
> Existing code calls connect() with a 'struct sockaddr_in6 *' argument
> where a 'struct sockaddr *' argument is declared, yielding compile errors
> when building for mips64el/musl-libc:
> 
> In file included from cgroup_ancestor.c:3:
> cgroup_ancestor.c: In function 'send_datagram':
> cgroup_ancestor.c:38:38: error: passing argument 2 of 'connect' from incompatible pointer type [-Werror=incompatible-pointer-types]
>    38 |         if (!ASSERT_OK(connect(sock, &addr, sizeof(addr)), "connect")) {
>       |                                      ^~~~~
>       |                                      |
>       |                                      struct sockaddr_in6 *
> ./test_progs.h:343:29: note: in definition of macro 'ASSERT_OK'
>   343 |         long long ___res = (res);                                       \
>       |                             ^~~
> In file included from .../netinet/in.h:10,
>                  from .../arpa/inet.h:9,
>                  from ./test_progs.h:17:
> .../sys/socket.h:386:19: note: expected 'const struct sockaddr *' but argument is of type 'struct sockaddr_in6 *'
>   386 | int connect (int, const struct sockaddr *, socklen_t);
>       |                   ^~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> 
> [...]

Here is the summary with links:
  - [bpf,v1] selftests/bpf: Fix error compiling cgroup_ancestor.c with musl libc
    https://git.kernel.org/bpf/bpf/c/60f802e2d6e1

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html






[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux