mirror of
https://github.com/RGBCube/serenity
synced 2025-07-30 15:37:46 +00:00
Ports/mrsh: Fix workdir, remove or upgrade patches
Also removes mrsh from the list of ports missing descriptions. I tried to be descriptive about the patches, but as I picked this port up from someone else, I'm not 100% sure how to best explain the patches.
This commit is contained in:
parent
020235a841
commit
a07e12609e
13 changed files with 184 additions and 263 deletions
|
@ -0,0 +1,41 @@
|
|||
From f254a0f09c9382deb6d2eb7497b453896b9a662f Mon Sep 17 00:00:00 2001
|
||||
From: EWouters <6179932+EWouters@users.noreply.github.com>
|
||||
Date: Tue, 12 Apr 2022 18:00:04 +0200
|
||||
Subject: [PATCH 2/4] Hardcode default path because `confstr` is missing
|
||||
|
||||
---
|
||||
shell/path.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/shell/path.c b/shell/path.c
|
||||
index 3c2bf65..ee2c4e9 100644
|
||||
--- a/shell/path.c
|
||||
+++ b/shell/path.c
|
||||
@@ -26,18 +26,24 @@ char *expand_path(struct mrsh_state *state, const char *file, bool exec,
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
+#ifndef __serenity__
|
||||
size_t pathe_size = confstr(_CS_PATH, NULL, 0);
|
||||
if (pathe_size == 0) {
|
||||
return NULL;
|
||||
}
|
||||
pathe = malloc(pathe_size);
|
||||
+#else
|
||||
+ pathe = strdup("/bin:/usr/bin");
|
||||
+#endif
|
||||
if (pathe == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
+#ifndef __serenity__
|
||||
if (confstr(_CS_PATH, pathe, pathe_size) != pathe_size) {
|
||||
free(pathe);
|
||||
return NULL;
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
char *path = NULL;
|
||||
--
|
||||
2.32.0 (Apple Git-132)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue