1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-30 14:57:36 +00:00

Ports: Update oksh's patches to use git patches

This commit is contained in:
Ali Mohammad Pur 2022-05-16 19:21:55 +04:30 committed by Ali Mohammad Pur
parent bb8febffac
commit 7077ce7779
6 changed files with 93 additions and 2 deletions

View file

@ -0,0 +1,41 @@
From bfc602df4e7eedd1cdc54dc5664ff1ff453fef1b Mon Sep 17 00:00:00 2001
From: Daniel Bertalan <dani@danielbertalan.dev>
Date: Fri, 5 Nov 2021 22:32:10 +0100
Subject: [PATCH 1/5] Add some compat macros for serenity
---
portable.h | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/portable.h b/portable.h
index 5c86edd..6ccf7f6 100644
--- a/portable.h
+++ b/portable.h
@@ -61,7 +61,7 @@
#define _PW_NAME_LEN MAXLOGNAME
#elif defined(__sun)
#define _PW_NAME_LEN LOGNAME_MAX
-#elif defined(__hpux)
+#elif defined(__hpux) || defined(__serenity__)
#define _PW_NAME_LEN 8
#else
#define _PW_NAME_LEN MAXLOGNAME - 1
@@ -116,6 +116,15 @@
#define nice(x) (int)0
#endif /* __HAIKU__ */
+#ifdef __serenity__
+#define _PATH_DEFPATH "/usr/bin:/usr/local/bin"
+#define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
+#define _CS_PATH 1
+#define WCOREFLAG 0200
+#define WCOREDUMP(x) ((x) & WCOREFLAG)
+#define nice(x) (int)0
+#endif /* __serenity__ */
+
#ifndef HAVE_SETRESGID
#define setresgid(x, y, z) setgid(x); setegid(y); setgid(z)
#endif /* !HAVE_SETRESGID */
--
2.36.1