From 3d05d4beeafbcb9b5dbdd3c8691210429899d4a7 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. PR-URL: https://github.com/nodejs/node/pull/30201 Reviewed-By: Anna Henningsen Reviewed-By: Franziska Hinkelmann Reviewed-By: Luigi Pinca Reviewed-By: Ruben Bridgewater --- 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 6168d9a968bf22..8dd51b3931959b 100644 --- a/src/debug_utils.cc +++ b/src/debug_utils.cc @@ -26,10 +26,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() @@ -337,7 +337,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: