ray/thirdparty/patches/hiredis-windows-strerror.patch
2019-12-17 15:32:47 -08:00

17 lines
751 B
Diff

diff --git deps/hiredis/hiredis.h deps/hiredis/hiredis.h
--- deps/hiredis/hiredis.h
+++ deps/hiredis/hiredis.h
@@ -87,5 +87,12 @@
+#ifdef _WIN32
+#define __redis_strerror_r(errno, buf, len) \
+ do { \
+ strerror_s((buf), (len), (errno)); \
+ } while (0)
+#else
/* "regular" POSIX strerror_r that does the right thing. */
#define __redis_strerror_r(errno, buf, len) \
do { \
strerror_r((errno), (buf), (len)); \
} while (0)
+#endif
--