19 lines
452 B
Diff
19 lines
452 B
Diff
--- a/linux/blkdev.c
|
|
+++ b/linux/blkdev.c
|
|
@@ -256,6 +256,15 @@
|
|
sync_check(bio, ret);
|
|
}
|
|
|
|
+#ifndef __GLIBC__
|
|
+/* musl lacks this */
|
|
+ssize_t pwritev2(int fd, const struct iovec *iov, int count, off_t ofs, int flags)
|
|
+{
|
|
+ return syscall(SYS_pwritev2, fd, iov, count,
|
|
+ (long)(ofs), (long)(ofs>>32), flags);
|
|
+}
|
|
+#endif
|
|
+
|
|
static void sync_write(struct bio *bio, struct iovec * iov, unsigned i)
|
|
{
|
|
ssize_t ret = pwritev2(bio->bi_bdev->bd_fd, iov, i,
|