1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 03:37:35 +00:00

Ports/make: Update make to version 4.4

This commit is contained in:
Cameron Youell 2023-03-27 21:25:12 +11:00 committed by Linus Groh
parent f22bf42566
commit 66f4ffe309
6 changed files with 39 additions and 52 deletions

View file

@ -8,7 +8,7 @@ Subject: [PATCH] Include ar.h for serenity as well
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/arscan.c b/src/arscan.c
index 3ce21db..c48a569 100644
index b6ed45a87754085aa1776c85e0181ba6edb0d7e6..2ae76f8134a581f3607a7d0c507d1d2e21dc3abc 100644
--- a/src/arscan.c
+++ b/src/arscan.c
@@ -331,7 +331,7 @@ ar_scan (const char *archive, ar_member_func_t function, const void *varg)

View file

@ -0,0 +1,31 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Cameron Youell <cameronyouell@gmail.com>
Date: Mon, 27 Mar 2023 21:18:24 +1100
Subject: [PATCH] Hardcode default path because `confstr` is missing
---
src/job.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/job.c b/src/job.c
index 8116855..914935a 100644
--- a/src/job.c
+++ b/src/job.c
@@ -2387,6 +2387,7 @@ child_execute_job (struct childbase *child, int good_stdin, char **argv)
/* execvp() will use a default PATH if none is set; emulate that. */
if (p == NULL)
{
+#ifndef __serenity__
size_t l = confstr (_CS_PATH, NULL, 0);
if (l)
{
@@ -2394,6 +2395,9 @@ child_execute_job (struct childbase *child, int good_stdin, char **argv)
confstr (_CS_PATH, dp, l);
p = dp;
}
+#else
+ p = strdup("/bin:/usr/bin");
+#endif
}
cmd = (char *)find_in_given_path (argv[0], p, NULL, 0);

View file

@ -1,42 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Andreas Kling <kling@serenityos.org>
Date: Tue, 15 Dec 2020 01:06:18 +0100
Subject: [PATCH] Stub getdtablesize() for serenity
---
lib/getdtablesize.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lib/getdtablesize.c b/lib/getdtablesize.c
index 0fe7092..a14d697 100644
--- a/lib/getdtablesize.c
+++ b/lib/getdtablesize.c
@@ -20,6 +20,10 @@
/* Specification. */
#include <unistd.h>
+#ifdef __serenity__
+# include <sys/select.h>
+#endif
+
#if defined _WIN32 && ! defined __CYGWIN__
# include <stdio.h>
@@ -109,6 +113,9 @@ getdtablesize (void)
int
getdtablesize (void)
{
+#ifdef __serenity__
+ return FD_SETSIZE;
+#else
struct rlimit lim;
if (getrlimit (RLIMIT_NOFILE, &lim) == 0
@@ -119,6 +126,7 @@ getdtablesize (void)
return lim.rlim_cur;
return INT_MAX;
+#endif
}
#endif

View file

@ -5,8 +5,6 @@
Include ar.h for serenity as well
## `0002-Stub-getdtablesize-for-serenity.patch`
Stub getdtablesize() for serenity
## `0002-Hardcode-default-path-because-is-missing.patch`
Hardcode default path because `confstr` is missing