Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit e92256f

Browse files
committed
Use posix_spawn on NetBSD as well.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@207864 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 060df13 commit e92256f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

include/lldb/Host/Host.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ class Host
477477
static bool
478478
GetProcessInfo (lldb::pid_t pid, ProcessInstanceInfo &proc_info);
479479

480-
#if defined (__APPLE__) || defined (__linux__) || defined (__FreeBSD__) || defined (__GLIBC__)
480+
#if defined (__APPLE__) || defined (__linux__) || defined (__FreeBSD__) || defined (__GLIBC__) || defined (__NetBSD__)
481481
static short
482482
GetPosixspawnFlags (ProcessLaunchInfo &launch_info);
483483

source/Host/common/Host.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#include <AvailabilityMacros.h>
4040
#endif
4141

42-
#if defined (__linux__) || defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__)
42+
#if defined (__linux__) || defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__) || defined(__NetBSD__)
4343
#include <spawn.h>
4444
#include <sys/wait.h>
4545
#include <sys/syscall.h>
@@ -1680,7 +1680,7 @@ Host::RunShellCommand (const char *command,
16801680
// LaunchProcessPosixSpawn for Apple, Linux, FreeBSD and other GLIBC
16811681
// systems
16821682

1683-
#if defined (__APPLE__) || defined (__linux__) || defined (__FreeBSD__) || defined (__GLIBC__)
1683+
#if defined (__APPLE__) || defined (__linux__) || defined (__FreeBSD__) || defined (__GLIBC__) || defined(__NetBSD__)
16841684

16851685
// this method needs to be visible to macosx/Host.cpp and
16861686
// common/Host.cpp.
@@ -1948,9 +1948,9 @@ Host::LaunchProcessPosixSpawn (const char *exe_path, ProcessLaunchInfo &launch_i
19481948
#endif // LaunchProcedssPosixSpawn: Apple, Linux, FreeBSD and other GLIBC systems
19491949

19501950

1951-
#if defined(__linux__) || defined(__FreeBSD__) || defined(__GLIBC__)
1952-
// The functions below implement process launching via posix_spawn() for Linux
1953-
// and FreeBSD.
1951+
#if defined(__linux__) || defined(__FreeBSD__) || defined(__GLIBC__) || defined(__NetBSD__)
1952+
// The functions below implement process launching via posix_spawn() for Linux,
1953+
// FreeBSD and NetBSD.
19541954

19551955
Error
19561956
Host::LaunchProcess (ProcessLaunchInfo &launch_info)
@@ -2030,7 +2030,7 @@ Host::LaunchProcess (ProcessLaunchInfo &launch_info)
20302030
return error;
20312031
}
20322032

2033-
#endif // defined(__linux__) or defined(__FreeBSD__)
2033+
#endif // defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
20342034

20352035
#ifndef _WIN32
20362036

0 commit comments

Comments
 (0)