diff options
| author | Alessio M <masariello@gmail.com> | 2020-09-04 09:31:47 +0100 | 
|---|---|---|
| committer | Alessio M <masariello@gmail.com> | 2020-09-04 09:31:47 +0100 | 
| commit | d7b1d21e807f8a90a086b2ef5cea9b707d4cc858 (patch) | |
| tree | 748b00a48a8b625f1dca22ae4cc5721ab7de87c5 /examples/example-ssl.c | |
| parent | 07c3618ffe7912c2ebc589ea45501c687a19cf2c (diff) | |
| parent | fb0e6c0dd9affd5728c6e0a6423f5dcb7b207947 (diff) | |
| download | hiredict-d7b1d21e807f8a90a086b2ef5cea9b707d4cc858.tar.xz | |
Merge branch 'master' of github.com:redis/hiredis
Diffstat (limited to 'examples/example-ssl.c')
| -rw-r--r-- | examples/example-ssl.c | 7 | 
1 files changed, 5 insertions, 2 deletions
| diff --git a/examples/example-ssl.c b/examples/example-ssl.c index 5eb2bbb..b8ca442 100644 --- a/examples/example-ssl.c +++ b/examples/example-ssl.c @@ -4,7 +4,10 @@  #include <hiredis.h>  #include <hiredis_ssl.h> -#include <win32.h> + +#ifdef _MSC_VER +#include <winsock2.h> /* For struct timeval */ +#endif  int main(int argc, char **argv) {      unsigned int j; @@ -33,7 +36,7 @@ int main(int argc, char **argv) {      struct timeval tv = { 1, 500000 }; // 1.5 seconds      redisOptions options = {0};      REDIS_OPTIONS_SET_TCP(&options, hostname, port); -    options.timeout = &tv; +    options.connect_timeout = &tv;      c = redisConnectWithOptions(&options);      if (c == NULL || c->err) { | 
