1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 14:27:34 +00:00

Ports: Remove two getprogname patches that are no longer needed

This commit is contained in:
Tim Schumacher 2022-08-12 01:03:27 +02:00 committed by Brian Gianforcaro
parent 2e0ed98bc5
commit 7e245b74f1
5 changed files with 1 additions and 112 deletions

View file

@ -1,37 +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] Implement getprogname()
---
lib/getprogname.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lib/getprogname.c b/lib/getprogname.c
index 9f69f5a..e5adb23 100644
--- a/lib/getprogname.c
+++ b/lib/getprogname.c
@@ -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 @@ getprogname (void)
}
}
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

View file

@ -10,8 +10,3 @@ Include ar.h for serenity as well
Stub getdtablesize() for serenity
## `0003-Implement-getprogname.patch`
Implement getprogname()