summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/bits
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/common/bits')
-rw-r--r--libc/sysdeps/linux/common/bits/fcntl-linux.h34
-rw-r--r--libc/sysdeps/linux/common/bits/mman-shared.h2
2 files changed, 34 insertions, 2 deletions
diff --git a/libc/sysdeps/linux/common/bits/fcntl-linux.h b/libc/sysdeps/linux/common/bits/fcntl-linux.h
new file mode 100644
index 000000000..d0236fd8b
--- /dev/null
+++ b/libc/sysdeps/linux/common/bits/fcntl-linux.h
@@ -0,0 +1,34 @@
+/* O_*, F_*, FD_* bit values for Linux.
+ Copyright (C) 2001-2024 Free Software Foundation, Inc.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _FCNTL_H
+# error "Never use <bits/fcntl-linux.h> directly; include <fcntl.h> instead."
+#endif
+
+#ifdef __USE_GNU
+/* Types of seals. */
+# define F_SEAL_SEAL 0x0001 /* Prevent further seals from being set. */
+# define F_SEAL_SHRINK 0x0002 /* Prevent file from shrinking. */
+# define F_SEAL_GROW 0x0004 /* Prevent file from growing. */
+# define F_SEAL_WRITE 0x0008 /* Prevent writes. */
+# define F_SEAL_FUTURE_WRITE 0x0010 /* Prevent future writes while
+ mapped. */
+# define F_SEAL_EXEC 0x0020 /* Prevent chmod modifying exec bits. */
+
+# define F_ADD_SEALS 1033 /* Add seals to file. */
+# define F_GET_SEALS 1034 /* Get seals for file. */
+#endif
diff --git a/libc/sysdeps/linux/common/bits/mman-shared.h b/libc/sysdeps/linux/common/bits/mman-shared.h
index 98c9e1d3c..c40ae2d1e 100644
--- a/libc/sysdeps/linux/common/bits/mman-shared.h
+++ b/libc/sysdeps/linux/common/bits/mman-shared.h
@@ -40,11 +40,9 @@
__BEGIN_DECLS
-#if 0
/* Create a new memory file descriptor. NAME is a name for debugging.
FLAGS is a combination of the MFD_* constants. */
int memfd_create (const char *__name, unsigned int __flags) __THROW;
-#endif
/* Lock pages from ADDR (inclusive) to ADDR + LENGTH (exclusive) into
memory. FLAGS is a combination of the MLOCK_* flags above. */