Skip to content

Commit

Permalink
Make sure standard library is imported when using abort (#395)
Browse files Browse the repository at this point in the history
I found a few cases where serverAssert() resulted in abort being added, but abort requires
stdlib. So, when serverAssert() uses abort, also automatically include stdlib.

Signed-off-by: Madelyn Olson <[email protected]>
  • Loading branch information
madolson authored Apr 27, 2024
1 parent a5a1377 commit b0d5a0f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@
#if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
#define valkey_unreachable __builtin_unreachable
#else
#include <stdlib.h>
#define valkey_unreachable abort
#endif

Expand Down

0 comments on commit b0d5a0f

Please sign in to comment.