mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-01-06 10:53:21 +00:00
nodejs: Disable v8 warning and set TMPDIR
This commit is contained in:
21
packages/nodejs/src-node_main.cc.patch
Normal file
21
packages/nodejs/src-node_main.cc.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
diff -u -r ../node-v6.0.0/src/node_main.cc ./src/node_main.cc
|
||||
--- ../node-v6.0.0/src/node_main.cc 2016-04-26 15:50:22.000000000 -0400
|
||||
+++ ./src/node_main.cc 2016-05-02 16:29:08.313594254 -0400
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "node.h"
|
||||
+#include <stdlib.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <VersionHelpers.h>
|
||||
@@ -50,6 +51,11 @@
|
||||
// UNIX
|
||||
int main(int argc, char *argv[]) {
|
||||
setvbuf(stderr, NULL, _IOLBF, 1024);
|
||||
+ if (getenv("TMPDIR") == NULL) {
|
||||
+ /* Give javascript programs (such as updated versions of npm) a working tmpdir. */
|
||||
+ putenv("TMPDIR=@TERMUX_PREFIX@/tmp");
|
||||
+ }
|
||||
+
|
||||
return node::Start(argc, argv);
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user