From d75538c1703f7acfdcb2d6c0d87f7690801c334f Mon Sep 17 00:00:00 2001 From: PabloMK7 Date: Tue, 3 Oct 2023 13:47:42 +0200 Subject: [PATCH] Fix MAC OS --- src/core/hle/service/soc/soc_u.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/core/hle/service/soc/soc_u.cpp b/src/core/hle/service/soc/soc_u.cpp index 7ff04fea8e..a05767ed85 100644 --- a/src/core/hle/service/soc/soc_u.cpp +++ b/src/core/hle/service/soc/soc_u.cpp @@ -1133,20 +1133,20 @@ void SOC_U::RecvFromOther(Kernel::HLERequestContext& ctx) { socklen_t src_addr_len = sizeof(src_addr); CTRSockAddr ctr_src_addr; if (parallel_data->addr_len > 0) { - parallel_data->ret = + parallel_data->ret = static_cast( ::recvfrom(parallel_data->fd_info.socket_fd, reinterpret_cast(parallel_data->output_buff.data()), - parallel_data->len, parallel_data->flags, &src_addr, &src_addr_len); + parallel_data->len, parallel_data->flags, &src_addr, &src_addr_len)); if (parallel_data->ret >= 0 && src_addr_len > 0) { ctr_src_addr = CTRSockAddr::FromPlatform(src_addr); std::memcpy(parallel_data->addr_buff.data(), &ctr_src_addr, parallel_data->addr_len); } } else { - parallel_data->ret = + parallel_data->ret = static_cast( ::recvfrom(parallel_data->fd_info.socket_fd, reinterpret_cast(parallel_data->output_buff.data()), - parallel_data->len, parallel_data->flags, NULL, 0); + parallel_data->len, parallel_data->flags, NULL, 0)); parallel_data->addr_buff.resize(0); } parallel_data->recv_error = (parallel_data->ret == SOCKET_ERROR_VALUE) ? GET_ERRNO : 0; @@ -1240,20 +1240,20 @@ void SOC_U::RecvFrom(Kernel::HLERequestContext& ctx) { CTRSockAddr ctr_src_addr; if (parallel_data->addr_len > 0) { // Only get src adr if input adr available - parallel_data->ret = + parallel_data->ret = static_cast( ::recvfrom(parallel_data->fd_info.socket_fd, reinterpret_cast(parallel_data->output_buff.data()), - parallel_data->len, parallel_data->flags, &src_addr, &src_addr_len); + parallel_data->len, parallel_data->flags, &src_addr, &src_addr_len)); if (parallel_data->ret >= 0 && src_addr_len > 0) { ctr_src_addr = CTRSockAddr::FromPlatform(src_addr); std::memcpy(parallel_data->addr_buff.data(), &ctr_src_addr, parallel_data->addr_len); } } else { - parallel_data->ret = + parallel_data->ret = static_cast( ::recvfrom(parallel_data->fd_info.socket_fd, reinterpret_cast(parallel_data->output_buff.data()), - parallel_data->len, parallel_data->flags, NULL, 0); + parallel_data->len, parallel_data->flags, NULL, 0)); parallel_data->addr_buff.resize(0); } parallel_data->recv_error = (parallel_data->ret == SOCKET_ERROR_VALUE) ? GET_ERRNO : 0;