diff --git a/src/debug_utils.cc b/src/debug_utils.cc index 4f086106b66ca7..d9db2d52e0db85 100644 --- a/src/debug_utils.cc +++ b/src/debug_utils.cc @@ -30,9 +30,9 @@ #endif // __POSIX__ -#if defined(__linux__) || defined(__sun) +#if defined(__linux__) || defined(__sun) || defined(__FreeBSD__) #include -#endif // (__linux__) || defined(__sun) +#endif // (__linux__) || defined(__sun) || defined(__FreeBSD__) #ifdef __APPLE__ #include // _dyld_get_image_name() @@ -322,7 +322,7 @@ void CheckedUvLoopClose(uv_loop_t* loop) { std::vector NativeSymbolDebuggingContext::GetLoadedLibraries() { std::vector list; -#ifdef __linux__ +#if defined(__linux__) || defined(__FreeBSD__) dl_iterate_phdr( [](struct dl_phdr_info* info, size_t size, void* data) { auto list = static_cast*>(data);