File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 5
5
#include "process.h"
6
6
7
7
int SPM_posix_spawn_file_actions_addchdir_np (posix_spawn_file_actions_t * restrict file_actions , const char * restrict path ) {
8
- #if __GLIBC_PREREQ (2 , 29 )
8
+ #if defined(__GLIBC__ )
9
+ # if __GLIBC_PREREQ (2 , 29 )
9
10
return posix_spawn_file_actions_addchdir_np (file_actions , path );
11
+ # else
12
+ return ENOSYS ;
13
+ # endif
10
14
#else
11
15
return ENOSYS ;
12
16
#endif
13
17
}
14
18
15
19
bool SPM_posix_spawn_file_actions_addchdir_np_supported () {
16
- #if __GLIBC_PREREQ (2 , 29 )
20
+ #if defined(__GLIBC__ )
21
+ # if __GLIBC_PREREQ (2 , 29 )
17
22
return true;
23
+ # else
24
+ return false;
25
+ # endif
18
26
#else
19
27
return false;
20
28
#endif
Original file line number Diff line number Diff line change @@ -271,7 +271,7 @@ class ProcessTests: XCTestCase {
271
271
return
272
272
}
273
273
274
- #if os(Linux)
274
+ #if os(Linux) || os(Android)
275
275
guard SPM_posix_spawn_file_actions_addchdir_np_supported ( ) else {
276
276
// Skip this test since it's not supported in this OS.
277
277
return
You can’t perform that action at this time.
0 commit comments