From 484b73a84251dfa6220867a29a0e9202111d1790 Mon Sep 17 00:00:00 2001 From: Binbin Date: Thu, 16 Mar 2023 17:24:52 +0800 Subject: Fix usleep compilation warning in auth.c (#11925) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is a -Wimplicit-function-declaration warning in here: ``` auth.c: In function ‘AuthBlock_ThreadMain’: auth.c:116:5: warning: implicit declaration of function ‘usleep’; did you mean ‘sleep’? [-Wimplicit-function-declaration] 116 | usleep(500000); | ^~~~~~ | sleep ``` --- tests/modules/auth.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') diff --git a/tests/modules/auth.c b/tests/modules/auth.c index 9ef0626cb..19be95a0a 100644 --- a/tests/modules/auth.c +++ b/tests/modules/auth.c @@ -1,3 +1,7 @@ +/* define macros for having usleep */ +#define _BSD_SOURCE +#define _DEFAULT_SOURCE + #include "redismodule.h" #include -- cgit v1.2.1