jsoncpp: Update from 1.8.3 to 1.8.4
[termux-packages] / packages / nodejs-current / src-node.cc.patch
CommitLineData
a61e7e45
FF
1Without this patch functions such as process.getgroups
2are not built on Android, which breaks things such as
3npm/node_modules/which/which.js.
4
816b3816
FF
5diff -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 @@
a61e7e45
FF
9 #include <unistd.h> // setuid, getuid
10 #endif
11
816b3816
FF
12-#if defined(__POSIX__) && !defined(__ANDROID__) && !defined(__CloudABI__)
13+#if defined(__POSIX__) && !defined(__CloudABI__)
a61e7e45
FF
14 #include <pwd.h> // getpwnam()
15 #include <grp.h> // getgrnam()
16 #endif
816b3816 17@@ -2122,7 +2122,7 @@
a61e7e45
FF
18 }
19
20
816b3816
FF
21-#if defined(__POSIX__) && !defined(__ANDROID__) && !defined(__CloudABI__)
22+#if defined(__POSIX__) && !defined(__CloudABI__)
a61e7e45
FF
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);
816b3816 26@@ -2441,7 +2441,7 @@
a61e7e45
FF
27 }
28 }
29
816b3816
FF
30-#endif // __POSIX__ && !defined(__ANDROID__) && !defined(__CloudABI__)
31+#endif // __POSIX__ && !defined(__CloudABI__)
a61e7e45
FF
32
33
816b3816
FF
34 static void WaitForInspectorDisconnect(Environment* env) {
35@@ -3711,7 +3711,7 @@
a61e7e45
FF
36
37 env->SetMethod(process, "umask", Umask);
38
816b3816
FF
39-#if defined(__POSIX__) && !defined(__ANDROID__) && !defined(__CloudABI__)
40+#if defined(__POSIX__) && !defined(__CloudABI__)
a61e7e45
FF
41 env->SetMethod(process, "getuid", GetUid);
42 env->SetMethod(process, "geteuid", GetEUid);
43 env->SetMethod(process, "setuid", SetUid);
816b3816 44@@ -3725,7 +3725,7 @@
a61e7e45
FF
45 env->SetMethod(process, "getgroups", GetGroups);
46 env->SetMethod(process, "setgroups", SetGroups);
47 env->SetMethod(process, "initgroups", InitGroups);
816b3816
FF
48-#endif // __POSIX__ && !defined(__ANDROID__) && !defined(__CloudABI__)
49+#endif // __POSIX__ && !defined(__CloudABI__)
a61e7e45
FF
50
51 env->SetMethod(process, "_kill", Kill);
52