mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-08-12 22:31:11 +04:00
20 lines
722 B
Diff
20 lines
722 B
Diff
Fix build on NetBSD, which provides posix_spawn_file_actions_addchdir()
|
|
but not the _np() variant.
|
|
|
|
Upstream PR: https://github.com/sheredom/subprocess.h/pull/102
|
|
Applied locally by scripts/sync_vendor.py until it is merged upstream.
|
|
|
|
diff --git a/subprocess.h b/subprocess.h
|
|
index 5e809023a4..74a4e006c7 100644
|
|
--- a/subprocess.h
|
|
+++ b/subprocess.h
|
|
@@ -1205,7 +1205,7 @@ cleanup:
|
|
|
|
// Set working directory
|
|
if (process_cwd) {
|
|
-#if defined(__APPLE__) && MAC_OS_X_VERSION_MIN_REQUIRED >= 260000
|
|
+#if defined(__NetBSD__) || (defined(__APPLE__) && MAC_OS_X_VERSION_MIN_REQUIRED >= 260000)
|
|
posix_error = posix_spawn_file_actions_addchdir(&actions, process_cwd);
|
|
#else
|
|
#if defined(__APPLE__) && defined(__clang__)
|