summaryrefslogtreecommitdiff
path: root/Ports/stress-ng/patches/0008-disable-lchown.patch
diff options
context:
space:
mode:
Diffstat (limited to 'Ports/stress-ng/patches/0008-disable-lchown.patch')
-rw-r--r--Ports/stress-ng/patches/0008-disable-lchown.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/Ports/stress-ng/patches/0008-disable-lchown.patch b/Ports/stress-ng/patches/0008-disable-lchown.patch
new file mode 100644
index 0000000000..73c11e7666
--- /dev/null
+++ b/Ports/stress-ng/patches/0008-disable-lchown.patch
@@ -0,0 +1,35 @@
+From 1903b9e5ddae07c13c56f6b7e85a0629450d2b6d Mon Sep 17 00:00:00 2001
+From: Brian Gianforcaro <b.gianfo@gmail.com>
+Date: Mon, 27 Dec 2021 23:37:23 -0800
+Subject: [PATCH 08/14] serenity: Disable lchown() calls in stress-chown
+ stressor for SerenityOS
+
+Serenity doesn't have an lchown implementation, so compile it out.
+---
+ stress-chown.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/stress-chown.c b/stress-chown.c
+index 5d53806..caefd90 100644
+--- a/stress-chown.c
++++ b/stress-chown.c
+@@ -221,6 +221,8 @@ static int stress_chown(const stress_args_t *args)
+ pr_fail("%s: chown %s failed, errno=%d (%s)\n",
+ args->name, filename, errno, strerror(errno));
+ }
++
++#ifndef __serenity__
+ ret = do_chown(lchown, filename, cap_chown, uid, gid);
+ if (ret < 0) {
+ if ((ret == -ENOENT) || (ret == -ENOTDIR)) {
+@@ -235,6 +237,7 @@ static int stress_chown(const stress_args_t *args)
+ pr_fail("%s: chown %s failed, errno=%d (%s)\n",
+ args->name, filename, errno, strerror(errno));
+ }
++#endif
+ inc_counter(args);
+ } while (keep_stressing(args));
+
+--
+2.32.0
+