Skip to content

Commit fc3303d

Browse files
authored
Fix ds-ipc-pal-socket.c Windows build. (#77840)
Mainly build on mobile platforms, but beneficial if it works on Windows in order to test Mono TCP/IP EventPipe transport.
1 parent b01311b commit fc3303d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/native/eventpipe/ds-ipc-pal-socket.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,7 @@ ipc_socket_accept (
537537
#endif
538538
} while (ipc_retry_syscall (client_socket));
539539

540+
#ifndef HOST_WIN32
540541
#if !HAVE_ACCEPT4 || !defined(SOCK_CLOEXEC)
541542
#if defined(FD_CLOEXEC)
542543
if (client_socket != -1)
@@ -545,6 +546,7 @@ ipc_socket_accept (
545546
fcntl (client_socket, F_SETFD, FD_CLOEXEC);
546547
}
547548
#endif
549+
#endif
548550
#endif
549551
DS_EXIT_BLOCKING_PAL_SECTION;
550552
return client_socket;
@@ -632,7 +634,7 @@ ipc_socket_recv (
632634
while (continue_recv && bytes_to_read - total_bytes_read > 0) {
633635
current_bytes_read = recv (
634636
s,
635-
buffer_cursor,
637+
(char *)buffer_cursor,
636638
bytes_to_read - total_bytes_read,
637639
0);
638640
if (ipc_retry_syscall (current_bytes_read))
@@ -666,7 +668,7 @@ ipc_socket_send (
666668
while (continue_send && bytes_to_write - total_bytes_written > 0) {
667669
current_bytes_written = send (
668670
s,
669-
buffer_cursor,
671+
(const char *)buffer_cursor,
670672
bytes_to_write - total_bytes_written,
671673
0);
672674
if (ipc_retry_syscall (current_bytes_written))

0 commit comments

Comments
 (0)