]> git.ipfire.org Git - thirdparty/dhcpcd.git/commit
ioctl: The POSIX signature differs from BSD and glibc
authorRoy Marples <roy@marples.name>
Wed, 8 Jan 2020 20:13:20 +0000 (20:13 +0000)
committerRoy Marples <roy@marples.name>
Wed, 8 Jan 2020 20:13:20 +0000 (20:13 +0000)
commitfa070df4e9ac982c9097fdfdbfde16ed3bd693b4
tree4c0f27df4110076994676980475f569ae6dc155d
parent7c434303d65a005aca39c618e476d53039541d78
ioctl: The POSIX signature differs from BSD and glibc

BSD and glibc have the signature for request as unsigned long.
musl and Solaris have a signed int.

As such, we need to detect this at compile time and adjust the
signature of our internal ioctl functions to match.
To keep the onwire format the same, memcpy the request to the
unsigned long request and back again, thus preserving the signedness.
configure
src/if.c
src/if.h
src/privsep-bpf.c
src/privsep-inet.c
src/privsep-root.c
src/privsep-root.h