Skip to content

Commit

Permalink
Include stddef in zmalloc.h (#516)
Browse files Browse the repository at this point in the history
zmalloc.h uses size_t, which requires stddef. It seems like all the
previous code paths were properly including it except for ASAN, which
uses libc malloc and skips the special mac only malloc inclusions.

Example failure:
https://github.com/valkey-io/valkey/actions/runs/9143545732/job/25140329029

See
https://github.com/valkey-io/valkey/actions/runs/9149533754/job/25153263875.

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
  • Loading branch information
madolson committed May 19, 2024
1 parent dcc9fd4 commit d52c8f3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/zmalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#ifndef __ZMALLOC_H
#define __ZMALLOC_H

#include <stddef.h>

/* Double expansion needed for stringification of macro values. */
#define __xstr(s) __str(s)
#define __str(s) #s
Expand Down

0 comments on commit d52c8f3

Please sign in to comment.