summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBinbin <binloveplay1314@qq.com>2023-03-16 17:24:52 +0800
committerGitHub <noreply@github.com>2023-03-16 11:24:52 +0200
commit484b73a84251dfa6220867a29a0e9202111d1790 (patch)
tree184a8450870f59f76a360bde63ee38700ce15a6a /tests
parent0b159b34ea0832f6589b8ee71b44dce7010e7504 (diff)
downloadredis-484b73a84251dfa6220867a29a0e9202111d1790.tar.gz
Fix usleep compilation warning in auth.c (#11925)
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 ```
Diffstat (limited to 'tests')
-rw-r--r--tests/modules/auth.c4
1 files changed, 4 insertions, 0 deletions
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 <string.h>