aboutgitcodebugslistschat
path: root/tcp_buf.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2024-10-30 21:36:18 +0100
committerStefano Brivio <sbrivio@redhat.com>2024-11-05 23:46:33 +0100
commit9afce0b45c396e43a5499f227cc21849812a435b (patch)
tree05c62d5c801bbbd0be21d92167ee0c2ea57a06ef /tcp_buf.c
parentd165d36a0c88fe8665da012f35cb60ced991568b (diff)
downloadpasst-9afce0b45c396e43a5499f227cc21849812a435b.tar
passt-9afce0b45c396e43a5499f227cc21849812a435b.tar.gz
passt-9afce0b45c396e43a5499f227cc21849812a435b.tar.bz2
passt-9afce0b45c396e43a5499f227cc21849812a435b.tar.lz
passt-9afce0b45c396e43a5499f227cc21849812a435b.tar.xz
passt-9afce0b45c396e43a5499f227cc21849812a435b.tar.zst
passt-9afce0b45c396e43a5499f227cc21849812a435b.zip
tap: Explicitly cast TUNSETIFF to fix build warning with musl on ppc64le
On ppc64le, TUNSETIFF happens to be 2147767498, which is bigger than INT_MAX (2^31 - 1), and musl declares the second argument of ioctl() as 'int', not 'unsigned long' like glibc does, probably because of how POSIX specifies the equivalent argument, int dcmd, in posix_devctl(), so gcc reports a warning: tap.c: In function 'tap_ns_tun': tap.c:1291:24: warning: overflow in conversion from 'long unsigned int' to 'int' changes value from '2147767498' to '-2147199798' [-Woverflow] 1291 | rc = ioctl(fd, TUNSETIFF, &ifr); | ^~~~~~~~~ We don't care about that overflow, so explicitly cast TUNSETIFF to int. Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tcp_buf.c')
0 files changed, 0 insertions, 0 deletions