Citing Lukasz Stelmach <l.stelmach@samsung.com>:
> The number of the memfd_syscall() on arm64 is the same as on arm only
> for 32-bit processes. 64-bit process must use the number defined in the
> asm-generic/unistd.h kernel header.
Additionally, made other numbers same as in glib.
Change-Id: Ibb038d5d0de13f8a7b88051364564c541ca0fa9a
#include <linux/version.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0)
-# if defined(__arm__) || defined(__aarch64__)
+# if defined(__arm__)
# define __NR_memfd_create 385
-# elif defined(__i386__) || defined(__x86_64__)
+# elif defined(__aarch64__)
# define __NR_memfd_create 279
+# elif defined(__i386__)
+# define __NR_memfd_create 356
+# elif defined(__x86_64__)
+# define __NR_memfd_create 319
# else
# error "Architecture not supported"
# endif