diff --git a/subprocess.h b/subprocess.h index 5e80902..74a4e00 100644 --- a/subprocess.h +++ b/subprocess.h @@ -1205,7 +1205,7 @@ int subprocess_create_ex(const char *const commandLine[], int options, // 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__)