mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-22 18:46:18 +00:00
Ports: Update thesilversearcher's patches to use git patches
This commit is contained in:
parent
6f6d1a8f76
commit
3531aa2b84
|
@ -0,0 +1,59 @@
|
|||
From 8fe6ace7f911ecc50ec7e29eb9d3af38869a9905 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
|
||||
--
|
||||
2.36.1
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
diff -u -r a/src/main.c b/src/main.c
|
||||
--- a/src/main.c 2018-08-07 02:43:51.000000000 -0400
|
||||
+++ b/src/main.c 2022-05-14 12:06:48.000000000 -0400
|
||||
@@ -44,7 +44,7 @@
|
||||
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 @@
|
||||
}
|
||||
|
||||
#ifdef HAVE_PLEDGE
|
||||
- if (pledge("stdio rpath", NULL) == -1) {
|
||||
+ if (pledge("stdio rpath thread", NULL) == -1) {
|
||||
die("pledge: %s", strerror(errno));
|
||||
}
|
||||
#endif
|
||||
diff -u -r a/src/options.c b/src/options.c
|
||||
--- a/src/options.c 2018-08-07 02:43:51.000000000 -0400
|
||||
+++ b/src/options.c 2022-05-14 12:09:45.000000000 -0400
|
||||
@@ -642,7 +642,7 @@
|
||||
|
||||
#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 @@
|
||||
}
|
||||
|
||||
#ifdef HAVE_PLEDGE
|
||||
- if (pledge("stdio rpath proc", NULL) == -1) {
|
||||
+ if (pledge("stdio rpath proc thread", NULL) == -1) {
|
||||
die("pledge: %s", strerror(errno));
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1,7 +1,9 @@
|
|||
# Patches for thesilversearcher on SerenityOS
|
||||
|
||||
## `0001-pledge-thread.patch`
|
||||
## `0001-Add-the-thread-pledge-to-the-pledge-list.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: Add thread option to pledges.
|
||||
On OpenBSD, stdio typically grants thread,
|
||||
but on Serenity it is its own option.
|
||||
|
|
Loading…
Reference in a new issue