SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
34
lang/node/patches/patch-src_env_cc
Normal file
34
lang/node/patches/patch-src_env_cc
Normal file
|
@ -0,0 +1,34 @@
|
|||
Index: src/env.cc
|
||||
--- src/env.cc.orig
|
||||
+++ src/env.cc
|
||||
@@ -613,29 +613,7 @@ std::unique_ptr<v8::BackingStore> Environment::release
|
||||
}
|
||||
|
||||
std::string GetExecPath(const std::vector<std::string>& argv) {
|
||||
- char exec_path_buf[2 * PATH_MAX];
|
||||
- size_t exec_path_len = sizeof(exec_path_buf);
|
||||
- std::string exec_path;
|
||||
- if (uv_exepath(exec_path_buf, &exec_path_len) == 0) {
|
||||
- exec_path = std::string(exec_path_buf, exec_path_len);
|
||||
- } else if (argv.size() > 0) {
|
||||
- exec_path = argv[0];
|
||||
- }
|
||||
-
|
||||
- // On OpenBSD process.execPath will be relative unless we
|
||||
- // get the full path before process.execPath is used.
|
||||
-#if defined(__OpenBSD__)
|
||||
- uv_fs_t req;
|
||||
- req.ptr = nullptr;
|
||||
- if (0 ==
|
||||
- uv_fs_realpath(nullptr, &req, exec_path.c_str(), nullptr)) {
|
||||
- CHECK_NOT_NULL(req.ptr);
|
||||
- exec_path = std::string(static_cast<char*>(req.ptr));
|
||||
- }
|
||||
- uv_fs_req_cleanup(&req);
|
||||
-#endif
|
||||
-
|
||||
- return exec_path;
|
||||
+ return "${LOCALBASE}/bin/node";
|
||||
}
|
||||
|
||||
Environment::Environment(IsolateData* isolate_data,
|
Loading…
Add table
Add a link
Reference in a new issue