jail: cgroups-bpf: fix compile with musl 1.2
authorDaniel Golle <daniel@makrotopia.org>
Wed, 4 Aug 2021 19:55:21 +0000 (20:55 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Wed, 4 Aug 2021 19:56:42 +0000 (20:56 +0100)
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>
jail/cgroups-bpf.c

index c287e8bb7ee4be7095bdb3b003f37f18a8ed1f95..f1bbeff029c4d097caffbfa27b5a653623b3e93c 100644 (file)
@@ -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>