Skip to content

Commit 50f6541

Browse files
devnexentargos
authored andcommitted
build: ease DragonFlyBSD build
Implicitly pretending being FreeBSD and disable large pages for this platform. PR-URL: #30201 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent a8df2e2 commit 50f6541

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/debug_utils.cc

+5-4
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
#endif // __POSIX__
2727

2828
#if defined(__linux__) || defined(__sun) || \
29-
defined(__FreeBSD__) || defined(__OpenBSD__)
29+
defined(__FreeBSD__) || defined(__OpenBSD__) || \
30+
defined(__DragonFly__)
3031
#include <link.h>
31-
#endif // (__linux__) || defined(__sun) ||
32-
// (__FreeBSD__) || defined(__OpenBSD__)
32+
#endif
3333

3434
#ifdef __APPLE__
3535
#include <mach-o/dyld.h> // _dyld_get_image_name()
@@ -337,7 +337,8 @@ void PrintLibuvHandleInformation(uv_loop_t* loop, FILE* stream) {
337337

338338
std::vector<std::string> NativeSymbolDebuggingContext::GetLoadedLibraries() {
339339
std::vector<std::string> list;
340-
#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
340+
#if defined(__linux__) || defined(__FreeBSD__) || \
341+
defined(__OpenBSD__) || defined(__DragonFly__)
341342
dl_iterate_phdr(
342343
[](struct dl_phdr_info* info, size_t size, void* data) {
343344
auto list = static_cast<std::vector<std::string>*>(data);

tools/utils.py

+4
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ def GuessOS():
6363
return 'solaris'
6464
elif id == 'NetBSD':
6565
return 'netbsd'
66+
elif id == 'DragonFly':
67+
# Doing so on purpose as they are pretty close
68+
# minus few features
69+
return 'freebsd'
6670
elif id == 'AIX':
6771
return 'aix'
6872
else:

0 commit comments

Comments
 (0)