mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-23 08:00:20 +00:00
63 lines
1.9 KiB
Diff
63 lines
1.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Ali Mohammad Pur <ali.mpfard@gmail.com>
|
|
Date: Fri, 9 Jul 2021 04:56:55 +0430
|
|
Subject: [PATCH] fs: Stub out unsupported syscalls
|
|
|
|
---
|
|
src/unix/fs.c | 13 ++++++++++---
|
|
1 file changed, 10 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/src/unix/fs.c b/src/unix/fs.c
|
|
index b3211ec..dc149e3 100644
|
|
--- a/src/unix/fs.c
|
|
+++ b/src/unix/fs.c
|
|
@@ -88,7 +88,8 @@
|
|
defined(__MVS__) || \
|
|
defined(__NetBSD__) || \
|
|
defined(__HAIKU__) || \
|
|
- defined(__QNX__)
|
|
+ defined(__QNX__) || \
|
|
+ defined(__serenity__)
|
|
# include <sys/statvfs.h>
|
|
#else
|
|
# include <sys/statfs.h>
|
|
@@ -656,7 +657,8 @@ static int uv__fs_statfs(uv_fs_t* req) {
|
|
defined(__MVS__) || \
|
|
defined(__NetBSD__) || \
|
|
defined(__HAIKU__) || \
|
|
- defined(__QNX__)
|
|
+ defined(__QNX__) || \
|
|
+ defined(__serenity__)
|
|
struct statvfs buf;
|
|
|
|
if (0 != statvfs(req->path, &buf))
|
|
@@ -678,7 +680,8 @@ static int uv__fs_statfs(uv_fs_t* req) {
|
|
defined(__OpenBSD__) || \
|
|
defined(__NetBSD__) || \
|
|
defined(__HAIKU__) || \
|
|
- defined(__QNX__)
|
|
+ defined(__QNX__) || \
|
|
+ defined(__serenity__)
|
|
stat_fs->f_type = 0; /* f_type is not supported. */
|
|
#else
|
|
stat_fs->f_type = buf.f_type;
|
|
@@ -1718,7 +1721,9 @@ static void uv__fs_work(struct uv__work* w) {
|
|
X(COPYFILE, uv__fs_copyfile(req));
|
|
X(FCHMOD, fchmod(req->file, req->mode));
|
|
X(FCHOWN, fchown(req->file, req->uid, req->gid));
|
|
+#ifndef __serenity__
|
|
X(LCHOWN, lchown(req->path, req->uid, req->gid));
|
|
+#endif
|
|
X(FDATASYNC, uv__fs_fdatasync(req));
|
|
X(FSTAT, uv__fs_fstat(req->file, &req->statbuf));
|
|
X(FSYNC, uv__fs_fsync(req));
|
|
@@ -1857,7 +1862,9 @@ int uv_fs_lchown(uv_loop_t* loop,
|
|
uv_uid_t uid,
|
|
uv_gid_t gid,
|
|
uv_fs_cb cb) {
|
|
+#ifndef __serenity__
|
|
INIT(LCHOWN);
|
|
+#endif
|
|
PATH;
|
|
req->uid = uid;
|
|
req->gid = gid;
|