diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2022-05-16 23:45:31 +0430 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2022-05-19 20:17:10 +0430 |
commit | 3531aa2b8423c6688bc062b1d0adfd10f1adb63f (patch) | |
tree | 242c4f68f4297eda502a60e3162110be46042854 | |
parent | 6f6d1a8f764e298f0867330994f3c7660362a0f5 (diff) | |
download | serenity-3531aa2b8423c6688bc062b1d0adfd10f1adb63f.zip |
Ports: Update thesilversearcher's patches to use git patches
3 files changed, 65 insertions, 47 deletions
diff --git a/Ports/thesilversearcher/patches/0001-Add-the-thread-pledge-to-the-pledge-list.patch b/Ports/thesilversearcher/patches/0001-Add-the-thread-pledge-to-the-pledge-list.patch new file mode 100644 index 0000000000..6388b4e966 --- /dev/null +++ b/Ports/thesilversearcher/patches/0001-Add-the-thread-pledge-to-the-pledge-list.patch @@ -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 + diff --git a/Ports/thesilversearcher/patches/0001-pledge-thread.patch b/Ports/thesilversearcher/patches/0001-pledge-thread.patch deleted file mode 100644 index e4c0ea52ba..0000000000 --- a/Ports/thesilversearcher/patches/0001-pledge-thread.patch +++ /dev/null @@ -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 - diff --git a/Ports/thesilversearcher/patches/ReadMe.md b/Ports/thesilversearcher/patches/ReadMe.md index 673114f6ce..55af8619d5 100644 --- a/Ports/thesilversearcher/patches/ReadMe.md +++ b/Ports/thesilversearcher/patches/ReadMe.md @@ -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. |