summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2019-06-22 13:08:35 +0100
committerRich Trott <rtrott@gmail.com>2019-07-29 23:27:12 -0700
commit3a9cb5ccb054393df131254a29ab8b1847c16751 (patch)
treecb5d91627952d9fd57cfcbaeecc19f2f1a4ca322
parente5e96fbc35202b5d61e6c1b9210917f20f1a8b12 (diff)
downloadandroid-node-v8-3a9cb5ccb054393df131254a29ab8b1847c16751.tar.gz
android-node-v8-3a9cb5ccb054393df131254a29ab8b1847c16751.tar.bz2
android-node-v8-3a9cb5ccb054393df131254a29ab8b1847c16751.zip
src: fix OpenBSD build
PR-URL: https://github.com/nodejs/node/pull/28384 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com>
-rw-r--r--src/debug_utils.cc8
-rw-r--r--src/env.cc2
-rw-r--r--src/node_report.cc2
3 files changed, 8 insertions, 4 deletions
diff --git a/src/debug_utils.cc b/src/debug_utils.cc
index a9bfa86b6d..a55936f4e7 100644
--- a/src/debug_utils.cc
+++ b/src/debug_utils.cc
@@ -26,9 +26,11 @@
#endif // __POSIX__
-#if defined(__linux__) || defined(__sun) || defined(__FreeBSD__)
+#if defined(__linux__) || defined(__sun) || \
+ defined(__FreeBSD__) || defined(__OpenBSD__)
#include <link.h>
-#endif // (__linux__) || defined(__sun) || defined(__FreeBSD__)
+#endif // (__linux__) || defined(__sun) ||
+ // (__FreeBSD__) || defined(__OpenBSD__)
#ifdef __APPLE__
#include <mach-o/dyld.h> // _dyld_get_image_name()
@@ -331,7 +333,7 @@ void PrintLibuvHandleInformation(uv_loop_t* loop, FILE* stream) {
std::vector<std::string> NativeSymbolDebuggingContext::GetLoadedLibraries() {
std::vector<std::string> list;
-#if defined(__linux__) || defined(__FreeBSD__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
dl_iterate_phdr(
[](struct dl_phdr_info* info, size_t size, void* data) {
auto list = static_cast<std::vector<std::string>*>(data);
diff --git a/src/env.cc b/src/env.cc
index 936b9a1854..80079c4f6e 100644
--- a/src/env.cc
+++ b/src/env.cc
@@ -277,7 +277,7 @@ std::string GetExecPath(const std::vector<std::string>& argv) {
uv_fs_t req;
req.ptr = nullptr;
if (0 ==
- uv_fs_realpath(env->event_loop(), &req, exec_path.c_str(), nullptr)) {
+ uv_fs_realpath(nullptr, &req, exec_path.c_str(), nullptr)) {
CHECK_NOT_NULL(req.ptr);
exec_path = std::string(static_cast<char*>(req.ptr));
}
diff --git a/src/node_report.cc b/src/node_report.cc
index ebeb386c27..4f2f1dd1ab 100644
--- a/src/node_report.cc
+++ b/src/node_report.cc
@@ -519,7 +519,9 @@ static void PrintSystemInformation(JSONWriter* writer) {
#ifndef __sun
{"max_user_processes", RLIMIT_NPROC},
#endif
+#ifndef __OpenBSD__
{"virtual_memory_kbytes", RLIMIT_AS}
+#endif
};
#endif // _WIN32
writer->json_objectstart("environmentVariables");