From e06180a588c3ee67967e181c1f16e92af67c258b Mon Sep 17 00:00:00 2001 From: Arthur O'Dwyer Date: Wed, 27 Nov 2019 12:02:26 -0500 Subject: [PATCH] uthash: Include when `HASH_DEBUG` is set. This way the user doesn't have to `#include ` just because someone on the command line did a `-DHASH_DEBUG`. --- src/uthash.h | 3 ++- tests/test95.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/uthash.h b/src/uthash.h index a790ea59..7532a460 100644 --- a/src/uthash.h +++ b/src/uthash.h @@ -522,7 +522,8 @@ do { * This is for uthash developer only; it compiles away if HASH_DEBUG isn't defined. */ #ifdef HASH_DEBUG -#define HASH_OOPS(...) do { fprintf(stderr,__VA_ARGS__); exit(-1); } while (0) +#include /* fprintf, stderr */ +#define HASH_OOPS(...) do { fprintf(stderr, __VA_ARGS__); exit(-1); } while (0) #define HASH_FSCK(hh,head,where) \ do { \ struct UT_hash_handle *_thh; \ diff --git a/tests/test95.c b/tests/test95.c index 67401ad0..7e715b58 100644 --- a/tests/test95.c +++ b/tests/test95.c @@ -1,5 +1,5 @@ #include -#include +#include /* size_t, NULL */ #include "utstack.h" typedef struct el {