mc: Fix path to zip and unzip (fixes #2362)
[termux-packages] / packages / nodejs-current / src-node.cc.patch
1 Without this patch functions such as process.getgroups
2 are not built on Android, which breaks things such as
3 npm/node_modules/which/which.js.
4
5 diff -u -r ../node-v9.1.0/src/node.cc ./src/node.cc
6 --- ../node-v9.1.0/src/node.cc 2017-11-07 16:08:24.000000000 +0100
7 +++ ./src/node.cc 2017-11-11 19:19:05.080439199 +0100
8 @@ -108,7 +108,7 @@
9 #include <unistd.h> // setuid, getuid
10 #endif
11
12 -#if defined(__POSIX__) && !defined(__ANDROID__) && !defined(__CloudABI__)
13 +#if defined(__POSIX__) && !defined(__CloudABI__)
14 #include <pwd.h> // getpwnam()
15 #include <grp.h> // getgrnam()
16 #endif
17 @@ -2122,7 +2122,7 @@
18 }
19
20
21 -#if defined(__POSIX__) && !defined(__ANDROID__) && !defined(__CloudABI__)
22 +#if defined(__POSIX__) && !defined(__CloudABI__)
23
24 static const uid_t uid_not_found = static_cast<uid_t>(-1);
25 static const gid_t gid_not_found = static_cast<gid_t>(-1);
26 @@ -2441,7 +2441,7 @@
27 }
28 }
29
30 -#endif // __POSIX__ && !defined(__ANDROID__) && !defined(__CloudABI__)
31 +#endif // __POSIX__ && !defined(__CloudABI__)
32
33
34 static void WaitForInspectorDisconnect(Environment* env) {
35 @@ -3711,7 +3711,7 @@
36
37 env->SetMethod(process, "umask", Umask);
38
39 -#if defined(__POSIX__) && !defined(__ANDROID__) && !defined(__CloudABI__)
40 +#if defined(__POSIX__) && !defined(__CloudABI__)
41 env->SetMethod(process, "getuid", GetUid);
42 env->SetMethod(process, "geteuid", GetEUid);
43 env->SetMethod(process, "setuid", SetUid);
44 @@ -3725,7 +3725,7 @@
45 env->SetMethod(process, "getgroups", GetGroups);
46 env->SetMethod(process, "setgroups", SetGroups);
47 env->SetMethod(process, "initgroups", InitGroups);
48 -#endif // __POSIX__ && !defined(__ANDROID__) && !defined(__CloudABI__)
49 +#endif // __POSIX__ && !defined(__CloudABI__)
50
51 env->SetMethod(process, "_kill", Kill);
52