summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Golle2021-08-04 19:55:21 +0000
committerDaniel Golle2021-08-04 19:56:42 +0000
commite10de288094795aa14ed972b6d6875102771194e (patch)
treeb4919d8a34ff31f988317fc690fc5798e459c3f7
parent516bdf26d4f60dc5fb063da8715fed2bad24dbd0 (diff)
downloadprocd-e10de288094795aa14ed972b6d6875102771194e.tar.gz
jail: cgroups-bpf: fix compile with musl 1.2
musl 1.2 no longer ships with <sys/cdefs.h>. Use it only on glibc, musl provides __WORDSIZE macro in <sys/regs.h>. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
-rw-r--r--jail/cgroups-bpf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/jail/cgroups-bpf.c b/jail/cgroups-bpf.c
index c287e8b..f1bbeff 100644
--- a/jail/cgroups-bpf.c
+++ b/jail/cgroups-bpf.c
@@ -19,8 +19,9 @@
#include <assert.h>
#include <linux/bpf.h>
+#ifdef __GLIBC__
#include <sys/cdefs.h>
-#ifndef __GLIBC__
+#else
#include <sys/reg.h>
#endif
#include <sys/syscall.h>