summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Kernel/API/POSIX/sys/uio.h22
-rw-r--r--Kernel/UnixTypes.h6
-rw-r--r--Userland/Libraries/LibC/sys/uio.h10
3 files changed, 25 insertions, 13 deletions
diff --git a/Kernel/API/POSIX/sys/uio.h b/Kernel/API/POSIX/sys/uio.h
new file mode 100644
index 0000000000..cbad45055f
--- /dev/null
+++ b/Kernel/API/POSIX/sys/uio.h
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#pragma once
+
+#include <Kernel/API/POSIX/sys/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct iovec {
+ void* iov_base;
+ size_t iov_len;
+};
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/Kernel/UnixTypes.h b/Kernel/UnixTypes.h
index 98d30de81e..17cf5a1cd2 100644
--- a/Kernel/UnixTypes.h
+++ b/Kernel/UnixTypes.h
@@ -25,6 +25,7 @@
#include <Kernel/API/POSIX/sys/stat.h>
#include <Kernel/API/POSIX/sys/time.h>
#include <Kernel/API/POSIX/sys/times.h>
+#include <Kernel/API/POSIX/sys/uio.h>
#include <Kernel/API/POSIX/sys/un.h>
#include <Kernel/API/POSIX/sys/utsname.h>
#include <Kernel/API/POSIX/sys/wait.h>
@@ -47,11 +48,6 @@ typedef u8 __u8;
typedef int __s32;
typedef short __s16;
-struct iovec {
- void* iov_base;
- size_t iov_len;
-};
-
struct sched_param {
int sched_priority;
};
diff --git a/Userland/Libraries/LibC/sys/uio.h b/Userland/Libraries/LibC/sys/uio.h
index 13aa56b925..cdccba1e80 100644
--- a/Userland/Libraries/LibC/sys/uio.h
+++ b/Userland/Libraries/LibC/sys/uio.h
@@ -1,21 +1,15 @@
/*
- * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
+ * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
-#include <sys/cdefs.h>
-#include <sys/types.h>
+#include <Kernel/API/POSIX/sys/uio.h>
__BEGIN_DECLS
-struct iovec {
- void* iov_base;
- size_t iov_len;
-};
-
ssize_t writev(int fd, const struct iovec*, int iov_count);
ssize_t readv(int fd, const struct iovec*, int iov_count);