Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
da46e926
Unverified
Commit
da46e926
authored
May 28, 2023
by
David CARLIER
Committed by
GitHub
May 28, 2023
Browse files
enable malloc_usable_size on haiku and dragonflybsd. (#12237)
parent
1a188e4e
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/config.c
View file @
da46e926
...
...
@@ -1685,7 +1685,7 @@ int rewriteConfigOverwriteFile(char *configfile, sds content) {
return
retval
;
}
#ifdef
_GNU_SOURCE
#if
def
ined(
_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 */
...
...
src/zmalloc.h
View file @
da46e926
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment