1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-21 18:55:07 +00:00
serenity/Ports/backward-cpp/patches/0001-test-Don-t-use-program_invocation_name-on-Serenity.patch

22 lines
869 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Andrew Kaster <andrewdkaster@gmail.com>
Date: Sat, 11 Mar 2023 13:57:17 -0700
Subject: [PATCH] test: Don't use program_invocation_name on Serenity
---
test/_test_main.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/_test_main.cpp b/test/_test_main.cpp
index 68211e030fd2984f291b412e2298a5359806c211..8cd458ab95b4b23d0935270eb6b5b63a63ee4da9 100644
--- a/test/_test_main.cpp
+++ b/test/_test_main.cpp
@@ -43,7 +43,7 @@ char argv0[MAX_PATH];
inline const char *getprogname() {
return GetModuleFileName(NULL, argv0, sizeof(argv0)) ? argv0 : NULL;
}
-#elif !defined(__APPLE__)
+#elif !defined(__APPLE__) && !defined(__serenity__)
// N.B. getprogname() is an Apple/BSD-ism.
// program_invocation_name is a GLIBC-ism, but it's also
// supported by libmusl.