diff options
Diffstat (limited to 'math/lean4/files/patch-src_runtime_process.cpp')
-rw-r--r-- | math/lean4/files/patch-src_runtime_process.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/math/lean4/files/patch-src_runtime_process.cpp b/math/lean4/files/patch-src_runtime_process.cpp new file mode 100644 index 000000000000..b13998f4743f --- /dev/null +++ b/math/lean4/files/patch-src_runtime_process.cpp @@ -0,0 +1,22 @@ +--- src/runtime/process.cpp.orig 2025-05-06 09:12:17 UTC ++++ src/runtime/process.cpp +@@ -31,6 +31,10 @@ Author: Jared Roesch + #include <sys/syscall.h> + #endif + ++#ifdef __FreeBSD__ ++#include <pthread_np.h> ++#endif ++ + #include "runtime/object.h" + #include "runtime/io.h" + #include "runtime/array_ref.h" +@@ -342,6 +346,8 @@ extern "C" LEAN_EXPORT obj_res lean_io_get_tid(obj_arg + lean_always_assert(pthread_threadid_np(NULL, &tid) == 0); + #elif defined(LEAN_EMSCRIPTEN) + tid = 0; ++#elif defined(__FreeBSD__) ++ tid = (pid_t)pthread_getthreadid_np(); + #else + // since Linux 2.4.11, our glibc 2.27 requires at least 3.2 + // glibc 2.30 would provide a wrapper |