Merge changes Ie555b16c,I4c5e45b6 into emu-master-dev
* changes:
Fix build issues after merge.
Merge v1.26 into emu-master-dev
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2929ad0..c8db954 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -176,6 +176,8 @@
endif()
if(WIN32 AND MSVC)
+ message(SEND_ERROR "Error: using win32 and msvc!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
+ return()
set(_gRPC_BASELIB_LIBRARIES wsock32 ws2_32)
endif()
diff --git a/emulator/CMakeLists.txt b/emulator/CMakeLists.txt
index 2a24a81..9ff6ba1 100644
--- a/emulator/CMakeLists.txt
+++ b/emulator/CMakeLists.txt
@@ -35,10 +35,10 @@
option(gRPC_BUILD_TESTS "Build tests" OFF)
set(gRPC_BUILD_CODEGEN ${gRPC_BUILD_TESTS})
-if(LINUX_X86_64)
+if(LINUX)
set(_gRPC_PLATFORM_LINUX ON)
set(_gRPC_PLATFORM_POSIX ON)
-elseif(DARWIN_X86_64)
+elseif(DARWIN_X86_64 OR DARWIN_AARCH64)
set(_gRPC_PLATFORM_MAC ON)
set(_gRPC_PLATFORM_POSIX ON)
else()
diff --git a/src/core/lib/iomgr/tcp_windows.cc b/src/core/lib/iomgr/tcp_windows.cc
index ab5a2a2..22c41db 100644
--- a/src/core/lib/iomgr/tcp_windows.cc
+++ b/src/core/lib/iomgr/tcp_windows.cc
@@ -485,7 +485,11 @@
return tcp->resource_user;
}
-static int win_get_fd(grpc_endpoint* ep) { return -1; }
+static int win_get_fd(grpc_endpoint* ep) {
+ grpc_tcp* tcp = (grpc_tcp*)ep;
+ grpc_winsocket* socket = tcp->socket;
+ return socket->socket;
+}
static bool win_can_track_err(grpc_endpoint* ep) { return false; }