From ef6d51ed44ab864e6db8722a19758f67cc7b12d9 Mon Sep 17 00:00:00 2001 From: DC Date: Sun, 25 Oct 2020 15:17:24 +0000 Subject: [PATCH] DragonFlyBSD build support. --- include/jemalloc/internal/jemalloc_internal_decls.h | 2 +- src/background_thread.c | 2 +- src/jemalloc.c | 2 +- src/prof_sys.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/jemalloc/internal/jemalloc_internal_decls.h b/include/jemalloc/internal/jemalloc_internal_decls.h index 32058ced..7d212c4e 100644 --- a/include/jemalloc/internal/jemalloc_internal_decls.h +++ b/include/jemalloc/internal/jemalloc_internal_decls.h @@ -32,7 +32,7 @@ # include # endif # include -# ifdef __FreeBSD__ +# if defined(__FreeBSD__) || defined(__DragonFly__) # include # endif # include diff --git a/src/background_thread.c b/src/background_thread.c index a36836cb..d4f96b1a 100644 --- a/src/background_thread.c +++ b/src/background_thread.c @@ -506,7 +506,7 @@ background_thread_entry(void *ind_arg) { assert(thread_ind < max_background_threads); #ifdef JEMALLOC_HAVE_PTHREAD_SETNAME_NP pthread_setname_np(pthread_self(), "jemalloc_bg_thd"); -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined(__DragonFly__) pthread_set_name_np(pthread_self(), "jemalloc_bg_thd"); #endif if (opt_percpu_arena != percpu_arena_disabled) { diff --git a/src/jemalloc.c b/src/jemalloc.c index 09b168ca..2a791e17 100644 --- a/src/jemalloc.c +++ b/src/jemalloc.c @@ -815,7 +815,7 @@ malloc_ncpus(void) { * is available, to avoid using more arenas than necessary. */ { -# if defined(__FreeBSD__) +# if defined(__FreeBSD__) || defined(__DragonFly__) cpuset_t set; # else cpu_set_t set; diff --git a/src/prof_sys.c b/src/prof_sys.c index dddba4b6..777ef1d2 100644 --- a/src/prof_sys.c +++ b/src/prof_sys.c @@ -436,7 +436,7 @@ prof_dump_open_maps_impl() { int mfd; cassert(config_prof); -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__DragonFly__) mfd = prof_open_maps_internal("/proc/curproc/map"); #elif defined(_WIN32) mfd = -1; // Not implemented