aboutsummaryrefslogtreecommitdiff
path: root/math/lean4/files/patch-src_runtime_io.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'math/lean4/files/patch-src_runtime_io.cpp')
-rw-r--r--math/lean4/files/patch-src_runtime_io.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/math/lean4/files/patch-src_runtime_io.cpp b/math/lean4/files/patch-src_runtime_io.cpp
index 2e185dfb816c..8fe17f4e138b 100644
--- a/math/lean4/files/patch-src_runtime_io.cpp
+++ b/math/lean4/files/patch-src_runtime_io.cpp
@@ -1,12 +1,11 @@
---- src/runtime/io.cpp.orig 2025-05-06 09:12:17 UTC
+--- src/runtime/io.cpp.orig 2025-11-18 02:29:21 UTC
+++ src/runtime/io.cpp
-@@ -1253,7 +1253,13 @@ extern "C" LEAN_EXPORT obj_res lean_io_app_path(obj_ar
+@@ -1365,7 +1365,13 @@ extern "C" LEAN_EXPORT obj_res lean_io_app_path(obj_ar
char dest[PATH_MAX];
memset(dest, 0, PATH_MAX);
pid_t pid = getpid();
-- snprintf(path, PATH_MAX, "/proc/%d/exe", pid);
+#if defined(__linux__)
-+ snprintf(path, PATH_MAX, "/proc/%d/exe", pid);
+ snprintf(path, PATH_MAX, "/proc/%d/exe", pid);
+#elif defined(__FreeBSD__)
+ snprintf(path, PATH_MAX, "/proc/%d/file", pid);
+#else