hiredis: Fix __redis_strerror_r lvalue error

Fixes the following build error:
hiredis.h:101:24: error: lvalue required as left operand of assignment
             buf[(len)] = '\0';

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
This commit is contained in:
Florian Fainelli 2017-04-01 17:50:14 -07:00
parent 0c432f8902
commit 49ed5295b1
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
Index: hiredis-0.13.3/hiredis.h
===================================================================
--- hiredis-0.13.3.orig/hiredis.h
+++ hiredis-0.13.3/hiredis.h
@@ -98,7 +98,7 @@
* then GNU strerror_r returned an internal static buffer and we \
* need to copy the result into our private buffer. */ \
if (err_str != (buf)) { \
- buf[(len)] = '\0'; \
+ (buf)[(len)] = '\0'; \
strncat((buf), err_str, ((len) - 1)); \
} \
} while (0)