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
e8e6ca63
Unverified
Commit
e8e6ca63
authored
Mar 07, 2021
by
Yossi Gottlieb
Committed by
GitHub
Mar 07, 2021
Browse files
Fix FreeBSD <12.x builds. (#8603)
parent
367ba412
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/zmalloc.h
View file @
e8e6ca63
...
@@ -71,12 +71,21 @@
...
@@ -71,12 +71,21 @@
*/
*/
#ifndef ZMALLOC_LIB
#ifndef ZMALLOC_LIB
#define ZMALLOC_LIB "libc"
#define ZMALLOC_LIB "libc"
#if !defined(NO_MALLOC_USABLE_SIZE) && \
#if !defined(NO_MALLOC_USABLE_SIZE) && \
(defined(__GLIBC__) || defined(__FreeBSD__) || \
(defined(__GLIBC__) || defined(__FreeBSD__) || \
defined(USE_MALLOC_USABLE_SIZE))
defined(USE_MALLOC_USABLE_SIZE))
/* Includes for malloc_usable_size() */
#ifdef __FreeBSD__
#include <malloc_np.h>
#else
#include <malloc.h>
#include <malloc.h>
#endif
#define HAVE_MALLOC_SIZE 1
#define HAVE_MALLOC_SIZE 1
#define zmalloc_size(p) malloc_usable_size(p)
#define zmalloc_size(p) malloc_usable_size(p)
#endif
#endif
#endif
#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