mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 02:35:09 +00:00

All of these patches did the same thing, which is already in upstream config.sub. With this change, we need only add `use_fresh_config_sub=true` to the package.sh file. Note that this is not done automatically in case the port has a modified config.sub file.
71 lines
1.8 KiB
Diff
71 lines
1.8 KiB
Diff
diff -ru make-4.3-clean/lib/getdtablesize.c make-4.3/lib/getdtablesize.c
|
|
--- make-4.3-clean/lib/getdtablesize.c 2020-01-19 21:34:01.000000000 +0100
|
|
+++ make-4.3/lib/getdtablesize.c 2020-12-15 00:53:49.661168383 +0100
|
|
@@ -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 @@
|
|
int
|
|
getdtablesize (void)
|
|
{
|
|
+#ifdef __serenity__
|
|
+ return FD_SETSIZE;
|
|
+#else
|
|
struct rlimit lim;
|
|
|
|
if (getrlimit (RLIMIT_NOFILE, &lim) == 0
|
|
@@ -119,6 +126,7 @@
|
|
return lim.rlim_cur;
|
|
|
|
return INT_MAX;
|
|
+#endif
|
|
}
|
|
|
|
#endif
|
|
diff -ru make-4.3-clean/lib/getprogname.c make-4.3/lib/getprogname.c
|
|
--- make-4.3-clean/lib/getprogname.c 2020-01-19 21:34:01.000000000 +0100
|
|
+++ make-4.3/lib/getprogname.c 2020-12-15 00:51:50.738132015 +0100
|
|
@@ -51,6 +51,10 @@
|
|
# include <sys/procfs.h>
|
|
#endif
|
|
|
|
+#ifdef __serenity__
|
|
+# include <unistd.h>
|
|
+#endif
|
|
+
|
|
#include "dirname.h"
|
|
|
|
#ifndef HAVE_GETPROGNAME /* not Mac OS X, FreeBSD, NetBSD, OpenBSD >= 5.4, Cygwin */
|
|
@@ -245,6 +249,12 @@
|
|
}
|
|
}
|
|
return NULL;
|
|
+# elif defined __serenity__
|
|
+ char* buffer = malloc(1024);
|
|
+ if (get_process_name(buffer, 1024) < 0)
|
|
+ return NULL;
|
|
+ return buffer;
|
|
+
|
|
# else
|
|
# error "getprogname module not ported to this OS"
|
|
# endif
|
|
diff -ru make-4.3-clean/src/arscan.c make-4.3/src/arscan.c
|
|
--- make-4.3-clean/src/arscan.c 2020-01-03 08:11:27.000000000 +0100
|
|
+++ make-4.3/src/arscan.c 2020-12-15 00:51:50.738132015 +0100
|
|
@@ -331,7 +331,7 @@
|
|
#endif
|
|
|
|
#ifndef WINDOWS32
|
|
-# if !defined (__ANDROID__) && !defined (__BEOS__)
|
|
+# if !defined (__ANDROID__) && !defined (__BEOS__) && !defined(__serenity__)
|
|
# include <ar.h>
|
|
# else
|
|
/* These platforms don't have <ar.h> but have archives in the same format
|