summaryrefslogtreecommitdiffstats
path: root/src/privsep-bpf.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-01-08 20:13:20 +0000
committerRoy Marples <roy@marples.name>2020-01-08 20:13:20 +0000
commit84bb0708e0d5996f010b733fdb68d17bf441e255 (patch)
tree4c0f27df4110076994676980475f569ae6dc155d /src/privsep-bpf.c
parentc55279517dc3df6743100c5e525d464010f563c6 (diff)
downloaddhcpcd-84bb0708e0d5996f010b733fdb68d17bf441e255.tar.xz
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.
Diffstat (limited to 'src/privsep-bpf.c')
-rw-r--r--src/privsep-bpf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/privsep-bpf.c b/src/privsep-bpf.c
index 0985bd2e..bb6ee083 100644
--- a/src/privsep-bpf.c
+++ b/src/privsep-bpf.c
@@ -40,6 +40,7 @@
#include <assert.h>
#include <pwd.h>
#include <errno.h>
+#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>