summaryrefslogtreecommitdiff
path: root/lib/libc/fcntl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/fcntl')
-rw-r--r--lib/libc/fcntl/creat.c7
-rw-r--r--lib/libc/fcntl/fcntl.c9
-rw-r--r--lib/libc/fcntl/open.c9
-rw-r--r--lib/libc/fcntl/openat.c9
-rw-r--r--lib/libc/fcntl/posix_fadvise.c7
-rw-r--r--lib/libc/fcntl/posix_fallocate.c7
6 files changed, 33 insertions, 15 deletions
diff --git a/lib/libc/fcntl/creat.c b/lib/libc/fcntl/creat.c
index fdcb6655..43110794 100644
--- a/lib/libc/fcntl/creat.c
+++ b/lib/libc/fcntl/creat.c
@@ -1,5 +1,8 @@
-#include <fcntl.h>
-#include <syscall.h>
+#include "asm/unistd_64.h" // for __NR_creat
+
+#include <fcntl.h> // for creat
+#include <sys/types.h> // for mode_t
+#include <syscall.h> // for __syscall_2, syscall
int creat(const char *path, mode_t mode)
{
diff --git a/lib/libc/fcntl/fcntl.c b/lib/libc/fcntl/fcntl.c
index ae213df5..6112567d 100644
--- a/lib/libc/fcntl/fcntl.c
+++ b/lib/libc/fcntl/fcntl.c
@@ -1,6 +1,9 @@
-#include <fcntl.h>
-#include <stdarg.h>
-#include <syscall.h>
+#include "asm/unistd_64.h" // for __NR_fcntl, __NR_close
+#include "errno.h" // for EINVAL
+
+#include <fcntl.h> // for F_DUPFD_CLOEXEC, FD_CLOEXEC, F_SETFD, F_D...
+#include <stdarg.h> // for va_arg, va_end, va_list, va_start
+#include <syscall.h> // for __syscall_ret, syscall, __syscall_3, __sy...
int fcntl(int fildes, int cmd, ...)
{
diff --git a/lib/libc/fcntl/open.c b/lib/libc/fcntl/open.c
index dbdff8f9..c00820c1 100644
--- a/lib/libc/fcntl/open.c
+++ b/lib/libc/fcntl/open.c
@@ -1,6 +1,9 @@
-#include <fcntl.h>
-#include <stdarg.h>
-#include <syscall.h>
+#include "asm/unistd_64.h" // for __NR_fcntl, __NR_open
+
+#include <fcntl.h> // for FD_CLOEXEC, F_SETFD, O_CLOEXEC, O_CREAT
+#include <stdarg.h> // for va_arg, va_end, va_list, va_start
+#include <sys/types.h> // for mode_t
+#include <syscall.h> // for __syscall_3, syscall
int open(const char *path, int oflag, ...)
{
diff --git a/lib/libc/fcntl/openat.c b/lib/libc/fcntl/openat.c
index bb34d600..d3475f6b 100644
--- a/lib/libc/fcntl/openat.c
+++ b/lib/libc/fcntl/openat.c
@@ -1,6 +1,9 @@
-#include <fcntl.h>
-#include <stdarg.h>
-#include <syscall.h>
+#include "asm/unistd_64.h" // for __NR_openat
+
+#include <fcntl.h> // for O_CREAT, openat
+#include <stdarg.h> // for va_arg, va_end, va_list, va_start
+#include <sys/types.h> // for mode_t
+#include <syscall.h> // for __syscall_4, syscall
int openat(int fd, const char *path, int oflag, ...)
{
diff --git a/lib/libc/fcntl/posix_fadvise.c b/lib/libc/fcntl/posix_fadvise.c
index dcf278fd..08718294 100644
--- a/lib/libc/fcntl/posix_fadvise.c
+++ b/lib/libc/fcntl/posix_fadvise.c
@@ -1,5 +1,8 @@
-#include <fcntl.h>
-#include <syscall.h>
+#include "asm/unistd_64.h" // for __NR_fadvise64
+
+#include <fcntl.h> // for posix_fadvise
+#include <sys/types.h> // for off_t
+#include <syscall.h> // for __syscall_4, syscall
int posix_fadvise(int fd, off_t offset, off_t len, int advice)
{
diff --git a/lib/libc/fcntl/posix_fallocate.c b/lib/libc/fcntl/posix_fallocate.c
index 221f2d38..61129c4a 100644
--- a/lib/libc/fcntl/posix_fallocate.c
+++ b/lib/libc/fcntl/posix_fallocate.c
@@ -1,5 +1,8 @@
-#include <fcntl.h>
-#include <syscall.h>
+#include "asm/unistd_64.h" // for __NR_fallocate
+
+#include <fcntl.h> // for posix_fallocate
+#include <sys/types.h> // for off_t
+#include <syscall.h> // for __syscall_4, syscall
int posix_fallocate(int fd, off_t offset, off_t len)
{