Browse Source

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>
Daniel Golle 2 years ago
parent
commit
e10de28809
1 changed files with 2 additions and 1 deletions
  1. 2 1
      jail/cgroups-bpf.c

+ 2 - 1
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>