mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 02:03:06 -05:00
56 lines
1.7 KiB
Diff
56 lines
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Raymond Lucke <ray@raylucke.com>
|
|
Date: Sat, 14 May 2022 13:25:23 -0400
|
|
Subject: [PATCH] Add the thread pledge to the pledge list
|
|
|
|
On OpenBSD, stdio typically grants thread, but on Serenity it is its own
|
|
option.
|
|
---
|
|
src/main.c | 4 ++--
|
|
src/options.c | 4 ++--
|
|
2 files changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/src/main.c b/src/main.c
|
|
index 6de2038..5b4029c 100644
|
|
--- a/src/main.c
|
|
+++ b/src/main.c
|
|
@@ -44,7 +44,7 @@ int main(int argc, char **argv) {
|
|
int num_cores;
|
|
|
|
#ifdef HAVE_PLEDGE
|
|
- if (pledge("stdio rpath proc exec", NULL) == -1) {
|
|
+ if (pledge("stdio rpath proc exec thread", NULL) == -1) {
|
|
die("pledge: %s", strerror(errno));
|
|
}
|
|
#endif
|
|
@@ -177,7 +177,7 @@ int main(int argc, char **argv) {
|
|
}
|
|
|
|
#ifdef HAVE_PLEDGE
|
|
- if (pledge("stdio rpath", NULL) == -1) {
|
|
+ if (pledge("stdio rpath thread", NULL) == -1) {
|
|
die("pledge: %s", strerror(errno));
|
|
}
|
|
#endif
|
|
diff --git a/src/options.c b/src/options.c
|
|
index e63985e..72f88b8 100644
|
|
--- a/src/options.c
|
|
+++ b/src/options.c
|
|
@@ -642,7 +642,7 @@ void parse_options(int argc, char **argv, char **base_paths[], char **paths[]) {
|
|
|
|
#ifdef HAVE_PLEDGE
|
|
if (opts.skip_vcs_ignores) {
|
|
- if (pledge("stdio rpath proc", NULL) == -1) {
|
|
+ if (pledge("stdio rpath proc thread", NULL) == -1) {
|
|
die("pledge: %s", strerror(errno));
|
|
}
|
|
}
|
|
@@ -717,7 +717,7 @@ void parse_options(int argc, char **argv, char **base_paths[], char **paths[]) {
|
|
}
|
|
|
|
#ifdef HAVE_PLEDGE
|
|
- if (pledge("stdio rpath proc", NULL) == -1) {
|
|
+ if (pledge("stdio rpath proc thread", NULL) == -1) {
|
|
die("pledge: %s", strerror(errno));
|
|
}
|
|
#endif
|