summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/memfd_create.c
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2024-08-11 20:22:48 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2024-08-11 20:22:48 +0200
commit811cd361e144dd7bdf75bcad8b4572ec786af5c7 (patch)
tree81451cdd45f1ecf5f72a2a12dd17fecb7b1cb889 /libc/sysdeps/linux/common/memfd_create.c
parent593eff77fa4d9ce95f3a9e7e8207ef9ddf4dcf9b (diff)
add memfd_create syscall wrapper
Diffstat (limited to 'libc/sysdeps/linux/common/memfd_create.c')
-rw-r--r--libc/sysdeps/linux/common/memfd_create.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/memfd_create.c b/libc/sysdeps/linux/common/memfd_create.c
new file mode 100644
index 000000000..7165f3278
--- /dev/null
+++ b/libc/sysdeps/linux/common/memfd_create.c
@@ -0,0 +1,13 @@
+/*
+ * memfd_create() for uClibc-ng
+ *
+ * Copyright (C) 2024 Waldemar Brodkorb <wbx@uclibc-ng.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#include <sys/syscall.h>
+#include <sys/mman.h>
+#if defined(__NR_memfd_create)
+_syscall2(int, memfd_create, const char *, name, unsigned int, flags)
+#endif