Skip to content

Commit 6087c30

Browse files
authored
[lldb] Simplify preprocessor conditional (#124522)
The long list of defines is just a very elaborate way to say "not windows".
1 parent 98e52db commit 6087c30

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

lldb/source/Host/common/Host.cpp

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,19 @@
1111
#include <climits>
1212
#include <cstdlib>
1313
#include <sys/types.h>
14+
1415
#ifndef _WIN32
1516
#include <dlfcn.h>
1617
#include <grp.h>
1718
#include <netdb.h>
1819
#include <pwd.h>
1920
#include <sys/stat.h>
21+
#include <sys/syscall.h>
22+
#include <sys/wait.h>
2023
#include <unistd.h>
24+
#if !defined(__ANDROID__)
25+
#include <spawn.h>
26+
#endif
2127
#endif
2228

2329
#if defined(__APPLE__)
@@ -26,16 +32,6 @@
2632
#include <mach/mach_port.h>
2733
#endif
2834

29-
#if defined(__linux__) || defined(__FreeBSD__) || \
30-
defined(__FreeBSD_kernel__) || defined(__APPLE__) || \
31-
defined(__NetBSD__) || defined(__OpenBSD__) || defined(__EMSCRIPTEN__)
32-
#if !defined(__ANDROID__)
33-
#include <spawn.h>
34-
#endif
35-
#include <sys/syscall.h>
36-
#include <sys/wait.h>
37-
#endif
38-
3935
#if defined(__FreeBSD__)
4036
#include <pthread_np.h>
4137
#endif

0 commit comments

Comments
 (0)