-
Notifications
You must be signed in to change notification settings - Fork 702
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename z{malloc,calloc,realloc,free} into valkey_{malloc,calloc,reall…
…oc,free} (#1169) The zcalloc symbol is a symbol name already used by zlib, which is defining other names using the "z" prefix specific to zlib. In practice, linking valkey with a static openssl, which itself might depend on a static libz will result in link time error rejecting multiple symbol definitions. Fixes: #1157 Signed-off-by: Romain Geissler <[email protected]>
- Loading branch information
1 parent
416defd
commit e30ae76
Showing
2 changed files
with
15 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
#ifndef HDR_MALLOC_H__ | ||
#define HDR_MALLOC_H__ | ||
|
||
void *zmalloc(size_t size); | ||
void *valkey_malloc(size_t size); | ||
void *zcalloc_num(size_t num, size_t size); | ||
void *zrealloc(void *ptr, size_t size); | ||
void zfree(void *ptr); | ||
void *valkey_realloc(void *ptr, size_t size); | ||
void valkey_free(void *ptr); | ||
|
||
#define hdr_malloc zmalloc | ||
#define hdr_malloc valkey_malloc | ||
#define hdr_calloc zcalloc_num | ||
#define hdr_realloc zrealloc | ||
#define hdr_free zfree | ||
#define hdr_realloc valkey_realloc | ||
#define hdr_free valkey_free | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters