From 706129a1619430cd0579e186767a6176089240f5 Mon Sep 17 00:00:00 2001 From: Frederik Deweerdt Date: Mon, 15 May 2017 09:19:21 -0700 Subject: Don't pass a negative value to __redisAsyncCommand if redisFormatSdsCommandArgv fails --- async.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/async.c b/async.c index d955203..a993ff1 100644 --- a/async.c +++ b/async.c @@ -676,6 +676,8 @@ int redisAsyncCommandArgv(redisAsyncContext *ac, redisCallbackFn *fn, void *priv int len; int status; len = redisFormatSdsCommandArgv(&cmd,argc,argv,argvlen); + if (len < 0) + return REDIS_ERR; status = __redisAsyncCommand(ac,fn,privdata,cmd,len); sdsfree(cmd); return status; -- cgit v1.2.3 From 6114da642991db0da3122e5d129e5050a449605a Mon Sep 17 00:00:00 2001 From: eldarko Date: Wed, 17 May 2017 11:03:24 +0300 Subject: Fix compilation on FreeBSD 10.3 with default compiler --- fmacros.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fmacros.h b/fmacros.h index 14fed60..9a56643 100644 --- a/fmacros.h +++ b/fmacros.h @@ -13,7 +13,7 @@ #if defined(__sun__) #define _POSIX_C_SOURCE 200112L #else -#if !(defined(__APPLE__) && defined(__MACH__)) +#if !(defined(__APPLE__) && defined(__MACH__)) && !(defined(__FreeBSD__)) #define _XOPEN_SOURCE 600 #endif #endif -- cgit v1.2.3