Skip to content

Commit dd2cc6e

Browse files
mehrdadnweb-flow
andauthored
Update hiredis and remove Windows patches (#9289)
Co-authored-by: Mehrdad <noreply@github.com>
1 parent dc51b08 commit dd2cc6e

File tree

8 files changed

+9
-136
lines changed

8 files changed

+9
-136
lines changed

bazel/BUILD.hiredis

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,15 @@ cc_library(
2525
],
2626
exclude =
2727
[
28+
"ssl.c",
2829
"test.c",
2930
],
3031
),
3132
hdrs = glob([
3233
"*.h",
3334
"adapters/*.h",
3435
]),
35-
copts = COPTS + select({
36-
"@bazel_tools//src/conditions:windows": [
37-
"-D" + "WIN32_REPLACE_FD_APIS",
38-
"/FI" + "win32fd.h",
39-
],
40-
"//conditions:default": [
41-
],
42-
}),
36+
copts = COPTS,
4337
include_prefix = "hiredis",
4438
deps = [
4539
":_hiredis",

bazel/ray_deps_setup.bzl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,10 @@ def ray_deps_setup():
8989
auto_http_archive(
9090
name = "com_github_redis_hiredis",
9191
build_file = "//bazel:BUILD.hiredis",
92-
url = "https://github.com/redis/hiredis/archive/33152ad163a21f568fb40eeeb88b79365886b4ea.tar.gz",
93-
sha256 = "9a91274dfd131111227b39ffa3cf7b446fbbd7ee2e5a94c8e7d8ad334b4ff255",
92+
url = "https://github.com/redis/hiredis/archive/392de5d7f97353485df1237872cb682842e8d83f.tar.gz",
93+
sha256 = "2101650d39a8f13293f263e9da242d2c6dee0cda08d343b2939ffe3d95cf3b8b",
9494
patches = [
95-
"//thirdparty/patches:hiredis-connect-rename.patch",
9695
"//thirdparty/patches:hiredis-windows-msvc.patch",
97-
"//thirdparty/patches:hiredis-windows-sigpipe.patch",
98-
"//thirdparty/patches:hiredis-windows-sockets.patch",
99-
"//thirdparty/patches:hiredis-windows-strerror.patch",
10096
],
10197
)
10298

src/ray/gcs/asio.cc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414

1515
#include "asio.h"
1616

17-
#ifdef _WIN32
18-
#include <win32fd.h>
19-
#endif
20-
2117
#include "ray/util/logging.h"
2218

2319
RedisAsioClient::RedisAsioClient(boost::asio::io_service &io_service,
@@ -37,7 +33,7 @@ RedisAsioClient::RedisAsioClient(boost::asio::io_service &io_service,
3733
#ifdef _WIN32
3834
SOCKET sock = SOCKET_ERROR;
3935
WSAPROTOCOL_INFO pi;
40-
if (WSADuplicateSocket(fh_get(c->fd), GetCurrentProcessId(), &pi) == 0) {
36+
if (WSADuplicateSocket(c->fd, GetCurrentProcessId(), &pi) == 0) {
4137
DWORD flag = WSA_FLAG_OVERLAPPED;
4238
sock = WSASocket(pi.iAddressFamily, pi.iSocketType, pi.iProtocol, &pi, 0, flag);
4339
}

thirdparty/patches/hiredis-connect-rename.patch

Lines changed: 0 additions & 28 deletions
This file was deleted.

thirdparty/patches/hiredis-windows-msvc.patch

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@ diff --git sds.h sds.h
1414
+#pragma pack(pop)
1515
+#endif
1616

17-
diff --git net.c net.c
18-
--- net.c
19-
+++ net.c
20-
@@ -52,1 +52,4 @@
21-
#include <stdlib.h>
17+
diff --git fmacros.h fmacros.h
18+
--- fmacros.h
19+
+++ fmacros.h
20+
@@ -12,0 +12,3 @@
2221
+#if defined(_MSC_VER) && !defined(__clang__) && !defined(strdup)
2322
+#define strdup _strdup
2423
+#endif

thirdparty/patches/hiredis-windows-sigpipe.patch

Lines changed: 0 additions & 9 deletions
This file was deleted.

thirdparty/patches/hiredis-windows-sockets.patch

Lines changed: 0 additions & 58 deletions
This file was deleted.

thirdparty/patches/hiredis-windows-strerror.patch

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)