2
0
mirror of https://github.com/boostorg/process.git synced 2026-02-08 23:12:11 +00:00

Fix building on OpenBSD

OpenBSD does not have close_range() nor does NetBSD.

OpenBSD needs environ like the other *BSD's.

The build was erroring on kp_pid, it looks like p_pid is appropriate.
This commit is contained in:
Brad Smith
2024-08-24 03:41:27 -04:00
committed by Klemens Morgenstern
parent 642bd7cf5c
commit 211a3134b6
3 changed files with 5 additions and 6 deletions

View File

@@ -551,9 +551,9 @@ std::vector<pid_type> all_pids(boost::system::error_code & ec)
vec.reserve(cntp);
for (int i = cntp - 1; i >= 0; i--)
{
if (proc_info[i].kp_pid >= 0)
if (proc_info[i].p_pid >= 0)
{
vec.push_back(proc_info[i].kp_pid);
vec.push_back(proc_info[i].p_pid);
}
}
}