Unverified Commit da46e926 authored by David CARLIER's avatar David CARLIER Committed by GitHub
Browse files

enable malloc_usable_size on haiku and dragonflybsd. (#12237)

parent 1a188e4e
......@@ -1685,7 +1685,7 @@ int rewriteConfigOverwriteFile(char *configfile, sds content) {
return retval;
}
#ifdef _GNU_SOURCE
#if defined(_GNU_SOURCE) && !defined(__HAIKU__)
fd = mkostemp(tmp_conffile, O_CLOEXEC);
#else
/* There's a theoretical chance here to leak the FD if a module thread forks & execv in the middle */
......
......@@ -74,12 +74,16 @@
#if !defined(NO_MALLOC_USABLE_SIZE) && \
(defined(__GLIBC__) || defined(__FreeBSD__) || \
defined(__DragonFly__) || defined(__HAIKU__) || \
defined(USE_MALLOC_USABLE_SIZE))
/* Includes for malloc_usable_size() */
#ifdef __FreeBSD__
#include <malloc_np.h>
#else
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <malloc.h>
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment