summaryrefslogtreecommitdiff
path: root/hiredis.h
diff options
context:
space:
mode:
authorjinjiazhang <jinjiazhang@tencent.com>2019-04-13 10:38:34 +0800
committerjinjiazhang <jinjiazhang@tencent.com>2019-04-13 10:38:34 +0800
commitcdb836d5f845d2bf0fbe58671d073869f41a9936 (patch)
tree1c54c2f3327c67da17bf718eb9dc353cc168bfda /hiredis.h
parent5aa2397f9ec494380774fb9155446f14ebbf3d1f (diff)
Fix Compile Error On Windows (Visual Studio)
Diffstat (limited to 'hiredis.h')
-rw-r--r--hiredis.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/hiredis.h b/hiredis.h
index 6e56c5e..1ae1c0a 100644
--- a/hiredis.h
+++ b/hiredis.h
@@ -35,7 +35,11 @@
#define __HIREDIS_H
#include "read.h"
#include <stdarg.h> /* for va_list */
+#ifndef _WIN32
#include <sys/time.h> /* for struct timeval */
+#else
+#include <winsock2.h>
+#endif
#include <stdint.h> /* uintXX_t, etc */
#include "sds.h" /* for sds */