mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
enable malloc_usable_size on haiku and dragonflybsd. (#12237)
This commit is contained in:
parent
1a188e4ed6
commit
da46e926ac
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user