summaryrefslogtreecommitdiff
path: root/src/debug_utils.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug_utils.cc')
-rw-r--r--src/debug_utils.cc8
1 files changed, 5 insertions, 3 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);