mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 19:35:08 +00:00
Kernel+LibC: Share definitions for sys/uio.h
This commit is contained in:
parent
37e98a55b7
commit
c9a5d83ccc
3 changed files with 25 additions and 13 deletions
22
Kernel/API/POSIX/sys/uio.h
Normal file
22
Kernel/API/POSIX/sys/uio.h
Normal file
|
@ -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
|
|
@ -25,6 +25,7 @@
|
||||||
#include <Kernel/API/POSIX/sys/stat.h>
|
#include <Kernel/API/POSIX/sys/stat.h>
|
||||||
#include <Kernel/API/POSIX/sys/time.h>
|
#include <Kernel/API/POSIX/sys/time.h>
|
||||||
#include <Kernel/API/POSIX/sys/times.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/un.h>
|
||||||
#include <Kernel/API/POSIX/sys/utsname.h>
|
#include <Kernel/API/POSIX/sys/utsname.h>
|
||||||
#include <Kernel/API/POSIX/sys/wait.h>
|
#include <Kernel/API/POSIX/sys/wait.h>
|
||||||
|
@ -47,11 +48,6 @@ typedef u8 __u8;
|
||||||
typedef int __s32;
|
typedef int __s32;
|
||||||
typedef short __s16;
|
typedef short __s16;
|
||||||
|
|
||||||
struct iovec {
|
|
||||||
void* iov_base;
|
|
||||||
size_t iov_len;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct sched_param {
|
struct sched_param {
|
||||||
int sched_priority;
|
int sched_priority;
|
||||||
};
|
};
|
||||||
|
|
|
@ -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
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <Kernel/API/POSIX/sys/uio.h>
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
|
|
||||||
struct iovec {
|
|
||||||
void* iov_base;
|
|
||||||
size_t iov_len;
|
|
||||||
};
|
|
||||||
|
|
||||||
ssize_t writev(int fd, const struct iovec*, int iov_count);
|
ssize_t writev(int fd, const struct iovec*, int iov_count);
|
||||||
ssize_t readv(int fd, const struct iovec*, int iov_count);
|
ssize_t readv(int fd, const struct iovec*, int iov_count);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue