From 36e200e2e051043ba8512da5c27a677c0d5c00a4 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Fri, 24 Feb 2023 11:12:35 -0500 Subject: [PATCH] sys/uio: Add preadv/pwritev. Fixes #18243. Change-Id: Ib5867f86100430f5e5c43ce4b2d6d561f546cc1e Reviewed-on: https://review.haiku-os.org/c/haiku/+/6068 Reviewed-by: waddlesplash --- headers/compatibility/bsd/sys/uio.h | 43 +++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 headers/compatibility/bsd/sys/uio.h diff --git a/headers/compatibility/bsd/sys/uio.h b/headers/compatibility/bsd/sys/uio.h new file mode 100644 index 0000000000..9a413a16d5 --- /dev/null +++ b/headers/compatibility/bsd/sys/uio.h @@ -0,0 +1,43 @@ +/* + * Copyright 2023, Haiku, Inc. All rights reserved. + * Distributed under the terms of the MIT License. + */ +#ifndef _BSD_SYS_UIO_H_ +#define _BSD_SYS_UIO_H_ + + +#include_next +#include + + +#ifdef _DEFAULT_SOURCE + + +#ifdef __cplusplus +extern "C" { +#endif + + +static inline ssize_t +preadv(int fd, const struct iovec *vecs, int count, off_t pos) +{ + return readv_pos(fd, pos, vecs, count); +} + + +static inline ssize_t +pwritev(int fd, const struct iovec *vecs, int count, off_t pos) +{ + return writev_pos(fd, pos, vecs, count); +} + + +#ifdef __cplusplus +} +#endif + + +#endif + + +#endif /* _BSD_SYS_UIO_H_ */