From 752ac9ba341f9d897bb8d96b1119b50d2107d24d Mon Sep 17 00:00:00 2001 From: David Carlier Date: Fri, 1 Nov 2019 04:01:02 +0000 Subject: [PATCH] build: ease DragonFlyBSD build Implicitly pretending being FreeBSD and disable large pages for this platform. --- src/debug_utils.cc | 9 +++++---- tools/utils.py | 4 ++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/debug_utils.cc b/src/debug_utils.cc index a55936f4e79c28..c3d2f5ac04ed31 100644 --- a/src/debug_utils.cc +++ b/src/debug_utils.cc @@ -27,10 +27,10 @@ #endif // __POSIX__ #if defined(__linux__) || defined(__sun) || \ - defined(__FreeBSD__) || defined(__OpenBSD__) + defined(__FreeBSD__) || defined(__OpenBSD__) || \ + defined(__DragonFly__) #include -#endif // (__linux__) || defined(__sun) || - // (__FreeBSD__) || defined(__OpenBSD__) +#endif #ifdef __APPLE__ #include // _dyld_get_image_name() @@ -333,7 +333,8 @@ void PrintLibuvHandleInformation(uv_loop_t* loop, FILE* stream) { std::vector NativeSymbolDebuggingContext::GetLoadedLibraries() { std::vector 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*>(data); diff --git a/tools/utils.py b/tools/utils.py index dd5ce3fcb629a4..014f3ac8667d02 100644 --- a/tools/utils.py +++ b/tools/utils.py @@ -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: