diff options
author | David Carlier <devnexen@gmail.com> | 2019-06-22 15:08:35 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-07-30 09:27:12 +0300 |
commit | 3a9cb5ccb054393df131254a29ab8b1847c16751 (patch) | |
tree | cb5d91627952d9fd57cfcbaeecc19f2f1a4ca322 /src/debug_utils.cc | |
parent | e5e96fbc35202b5d61e6c1b9210917f20f1a8b12 (diff) |
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>
Diffstat (limited to 'src/debug_utils.cc')
-rw-r--r-- | src/debug_utils.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/debug_utils.cc b/src/debug_utils.cc index a9bfa86b6d2..a55936f4e79 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); |