diff options
author | John Graham <john@simpli.fi> | 2013-09-10 15:18:16 -0500 |
---|---|---|
committer | Matt Stancliff <matt@genges.com> | 2014-04-09 17:02:42 -0400 |
commit | f20f5ad10264a10d41aa2a47c029fba71820d62a (patch) | |
tree | c2d0d3c3a58159a4f34d4222df6f43d85757c94d | |
parent | 303a0421ef0dd347715f4249e1620d04a832d7e9 (diff) |
Libuv: Fix compile warnings and C++ compatability
Closes #189
-rw-r--r-- | adapters/libuv.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/adapters/libuv.h b/adapters/libuv.h index e61d5ca..f959095 100644 --- a/adapters/libuv.h +++ b/adapters/libuv.h @@ -3,7 +3,7 @@ #include <uv.h> #include "../hiredis.h" #include "../async.h" - +#include <string.h> typedef struct redisLibuvEvents { redisAsyncContext* context; @@ -11,6 +11,7 @@ typedef struct redisLibuvEvents { int events; } redisLibuvEvents; +int redisLibuvAttach(redisAsyncContext*, uv_loop_t*); static void redisLibuvPoll(uv_poll_t* handle, int status, int events) { redisLibuvEvents* p = (redisLibuvEvents*)handle->data; @@ -99,7 +100,7 @@ int redisLibuvAttach(redisAsyncContext* ac, uv_loop_t* loop) { ac->ev.delWrite = redisLibuvDelWrite; ac->ev.cleanup = redisLibuvCleanup; - redisLibuvEvents* p = malloc(sizeof(*p)); + redisLibuvEvents* p = (redisLibuvEvents*)malloc(sizeof(*p)); if (!p) { return REDIS_ERR; |