Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: ease DragonFlyBSD build #30201

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/debug_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
#endif // __POSIX__

#if defined(__linux__) || defined(__sun) || \
defined(__FreeBSD__) || defined(__OpenBSD__)
defined(__FreeBSD__) || defined(__OpenBSD__) || \
defined(__DragonFly__)
#include <link.h>
#endif // (__linux__) || defined(__sun) ||
// (__FreeBSD__) || defined(__OpenBSD__)
#endif

#ifdef __APPLE__
#include <mach-o/dyld.h> // _dyld_get_image_name()
Expand Down Expand Up @@ -333,7 +333,8 @@ void PrintLibuvHandleInformation(uv_loop_t* loop, FILE* stream) {

std::vector<std::string> NativeSymbolDebuggingContext::GetLoadedLibraries() {
std::vector<std::string> list;
#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
#if defined(__linux__) || defined(__FreeBSD__) || \
defined(__OpenBSD__) || defined(__DragonFly__)
dl_iterate_phdr(
[](struct dl_phdr_info* info, size_t size, void* data) {
auto list = static_cast<std::vector<std::string>*>(data);
Expand Down
4 changes: 4 additions & 0 deletions tools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ def GuessOS():
return 'solaris'
elif id == 'NetBSD':
return 'netbsd'
elif id == 'DragonFly':
# Doing so on purpose as they are pretty close
# minus few features
return 'freebsd'
elif id == 'AIX':
return 'aix'
else:
Expand Down