From 9f0f533bc8f491e1612b2e6eaf10215aba54023b Mon Sep 17 00:00:00 2001 From: Binbin Date: Tue, 2 Aug 2022 23:00:11 +0800 Subject: [PATCH] Solve usleep compilation warning in keyspace_events.c (#11073) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is a -Wimplicit-function-declaration warning in here: ``` keyspace_events.c: In function ‘KeySpace_NotificationGeneric’: keyspace_events.c:67:9: warning: implicit declaration of function ‘usleep’; did you mean ‘sleep’? [-Wimplicit-function-declaration] 67 | usleep(1); | ^~~~~~ | sleep ``` --- tests/modules/keyspace_events.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/modules/keyspace_events.c b/tests/modules/keyspace_events.c index c0f79bf37..d394786b3 100644 --- a/tests/modules/keyspace_events.c +++ b/tests/modules/keyspace_events.c @@ -30,6 +30,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#define _BSD_SOURCE #define _DEFAULT_SOURCE /* For usleep */ #include "redismodule.h"