add temporary defines for memfd_create() syscall
authorKay Sievers <kay@vrfy.org>
Wed, 1 Oct 2014 17:09:19 +0000 (19:09 +0200)
committerKay Sievers <kay@vrfy.org>
Wed, 1 Oct 2014 17:09:19 +0000 (19:09 +0200)
test/Makefile
test/kdbus-util.c

index ab3774013b913ba50ffa3316928cf3009ca1103f..0c2ccc15bd2f4c879b0bc1d255328b9e81bcc78c 100644 (file)
@@ -6,7 +6,6 @@ endif
 
 CFLAGS         += -std=gnu99 -Wall -Wextra -g \
                   -include $(KERNELDIR)/include/uapi/linux/memfd.h \
-                  -include $(KERNELDIR)/include/uapi/asm-generic/unistd.h \
                   -D_GNU_SOURCE \
                   -Wno-unused-parameter \
                   -Wmaybe-uninitialized \
index 0aa23c75c6e4ec75944d020b7acd32fc76695c72..043b06f552616a520c1970b472673988003717b9 100644 (file)
 #include <linux/memfd.h>
 #endif
 
+#ifndef __NR_memfd_create
+  #ifdef __x86_64__
+    #define __NR_memfd_create 319
+  #elif defined __arm__
+    #define __NR_memfd_create 385
+  #else
+    #define __NR_memfd_create 356
+  #endif
+#endif
+
 #include "kdbus-util.h"
 #include "kdbus-enum.h"