mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 07:39:26 +01:00
Fix Linux build
This commit is contained in:
parent
ede0889e3d
commit
40e6e9b9fa
@ -331,6 +331,8 @@ if(OPROFILING)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
include(FindOpenSSL REQUIRED)
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
# Setup include directories (and make sure they are preferred over the Externals)
|
# Setup include directories (and make sure they are preferred over the Externals)
|
||||||
#
|
#
|
||||||
|
@ -26,7 +26,6 @@ set(SRCS Src/ActionReplay.cpp
|
|||||||
Src/Boot/Boot_ELF.cpp
|
Src/Boot/Boot_ELF.cpp
|
||||||
Src/Boot/Boot_WiiWAD.cpp
|
Src/Boot/Boot_WiiWAD.cpp
|
||||||
Src/Boot/ElfReader.cpp
|
Src/Boot/ElfReader.cpp
|
||||||
Src/Boot/SettingsHandler.cpp
|
|
||||||
Src/Debugger/Debugger_SymbolMap.cpp
|
Src/Debugger/Debugger_SymbolMap.cpp
|
||||||
Src/Debugger/Dump.cpp
|
Src/Debugger/Dump.cpp
|
||||||
Src/Debugger/PPCDebugInterface.cpp
|
Src/Debugger/PPCDebugInterface.cpp
|
||||||
@ -134,6 +133,7 @@ set(SRCS Src/ActionReplay.cpp
|
|||||||
Src/HW/WiimoteEmu/Encryption.cpp
|
Src/HW/WiimoteEmu/Encryption.cpp
|
||||||
Src/HW/WiimoteEmu/Speaker.cpp
|
Src/HW/WiimoteEmu/Speaker.cpp
|
||||||
Src/HW/WiimoteReal/WiimoteReal.cpp
|
Src/HW/WiimoteReal/WiimoteReal.cpp
|
||||||
|
Src/IPC_HLE/ICMPLin.cpp
|
||||||
Src/IPC_HLE/WII_IPC_HLE.cpp
|
Src/IPC_HLE/WII_IPC_HLE.cpp
|
||||||
Src/IPC_HLE/WII_IPC_HLE_Device_DI.cpp
|
Src/IPC_HLE/WII_IPC_HLE_Device_DI.cpp
|
||||||
Src/IPC_HLE/WII_IPC_HLE_Device_es.cpp
|
Src/IPC_HLE/WII_IPC_HLE_Device_es.cpp
|
||||||
@ -194,7 +194,7 @@ set(SRCS Src/ActionReplay.cpp
|
|||||||
Src/PowerPC/JitCommon/JitCache.cpp
|
Src/PowerPC/JitCommon/JitCache.cpp
|
||||||
Src/PowerPC/JitCommon/Jit_Util.cpp)
|
Src/PowerPC/JitCommon/Jit_Util.cpp)
|
||||||
|
|
||||||
set(LIBS bdisasm inputcommon videoogl videosoftware sfml-network ssl)
|
set(LIBS bdisasm inputcommon videoogl videosoftware sfml-network ${OPENSSL_LIBRARIES})
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(SRCS ${SRCS} Src/HW/BBA-TAP/TAP_Win32.cpp Src/stdafx.cpp
|
set(SRCS ${SRCS} Src/HW/BBA-TAP/TAP_Win32.cpp Src/stdafx.cpp
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
#pragma once
|
#ifndef _ICMP_H_
|
||||||
|
#define _ICMP_H_
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
|
#else
|
||||||
|
#include <netinet/in.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
|
|
||||||
int icmp_echo_req(const u32 s, const sockaddr_in *addr, const u8 *data, const u32 data_length);
|
int icmp_echo_req(const u32 s, const sockaddr_in *addr, const u8 *data, const u32 data_length);
|
||||||
int icmp_echo_rep(const u32 s, sockaddr_in *addr, const u32 timeout, const u32 data_length);
|
int icmp_echo_rep(const u32 s, sockaddr_in *addr, const u32 timeout, const u32 data_length);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
16
Source/Core/Core/Src/IPC_HLE/ICMPLin.cpp
Normal file
16
Source/Core/Core/Src/IPC_HLE/ICMPLin.cpp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#include "ICMP.h"
|
||||||
|
|
||||||
|
// Currently stubbed. AFAIK (delroth) there is no way to send ICMP echo
|
||||||
|
// requests without being root on current Linux versions.
|
||||||
|
|
||||||
|
int icmp_echo_req(const u32 s, const sockaddr_in *addr, const u8 *data, const u32 data_length)
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int icmp_echo_rep(const u32 s, sockaddr_in *addr, const u32 timeout, const u32 data_length)
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
return -1;
|
||||||
|
}
|
@ -1011,7 +1011,11 @@ u32 CWII_IPC_HLE_Device_net_ip_top::ExecuteCommand(u32 _Command,
|
|||||||
case IOCTL_SO_ICMPCLOSE:
|
case IOCTL_SO_ICMPCLOSE:
|
||||||
{
|
{
|
||||||
u32 sock = Memory::Read_U32(_BufferIn);
|
u32 sock = Memory::Read_U32(_BufferIn);
|
||||||
|
#ifdef _WIN32
|
||||||
u32 ret = closesocket(sock);
|
u32 ret = closesocket(sock);
|
||||||
|
#else
|
||||||
|
u32 ret = close(sock);
|
||||||
|
#endif
|
||||||
DEBUG_LOG(WII_IPC_NET, "IOCTL_SO_ICMPCLOSE(%x) %x", sock, ret);
|
DEBUG_LOG(WII_IPC_NET, "IOCTL_SO_ICMPCLOSE(%x) %x", sock, ret);
|
||||||
return getNetErrorCode(ret, "IOCTL_SO_ICMPCLOSE", false);
|
return getNetErrorCode(ret, "IOCTL_SO_ICMPCLOSE", false);
|
||||||
}
|
}
|
||||||
@ -1242,10 +1246,17 @@ u32 CWII_IPC_HLE_Device_net_ip_top::ExecuteCommandV(SIOCtlVBuffer& CommandBuffer
|
|||||||
"IOCTLV_SO_SENDTO = %d Socket: %08x, BufferIn: (%08x, %i), BufferIn2: (%08x, %i), %u.%u.%u.%u",
|
"IOCTLV_SO_SENDTO = %d Socket: %08x, BufferIn: (%08x, %i), BufferIn2: (%08x, %i), %u.%u.%u.%u",
|
||||||
ret, Common::swap32(params.socket), _BufferIn, BufferInSize,
|
ret, Common::swap32(params.socket), _BufferIn, BufferInSize,
|
||||||
_BufferIn2, BufferInSize2,
|
_BufferIn2, BufferInSize2,
|
||||||
|
#ifdef _WIN32
|
||||||
addr->sin_addr.S_un.S_un_b.s_b1,
|
addr->sin_addr.S_un.S_un_b.s_b1,
|
||||||
addr->sin_addr.S_un.S_un_b.s_b2,
|
addr->sin_addr.S_un.S_un_b.s_b2,
|
||||||
addr->sin_addr.S_un.S_un_b.s_b3,
|
addr->sin_addr.S_un.S_un_b.s_b3,
|
||||||
addr->sin_addr.S_un.S_un_b.s_b4
|
addr->sin_addr.S_un.S_un_b.s_b4
|
||||||
|
#else
|
||||||
|
addr->sin_addr.s_addr & 0xFF,
|
||||||
|
(addr->sin_addr.s_addr >> 8) & 0xFF,
|
||||||
|
(addr->sin_addr.s_addr >> 16) & 0xFF,
|
||||||
|
(addr->sin_addr.s_addr >> 24) & 0xFF
|
||||||
|
#endif
|
||||||
);
|
);
|
||||||
|
|
||||||
return getNetErrorCode(ret, "SO_SENDTO", true);
|
return getNetErrorCode(ret, "SO_SENDTO", true);
|
||||||
@ -1432,7 +1443,11 @@ u32 CWII_IPC_HLE_Device_net_ip_top::ExecuteCommandV(SIOCtlVBuffer& CommandBuffer
|
|||||||
|
|
||||||
sockaddr_in addr;
|
sockaddr_in addr;
|
||||||
addr.sin_family = AF_INET;
|
addr.sin_family = AF_INET;
|
||||||
|
#ifdef _WIN32
|
||||||
addr.sin_addr.S_un.S_addr = Common::swap32(ip_info.ip);
|
addr.sin_addr.S_un.S_addr = Common::swap32(ip_info.ip);
|
||||||
|
#else
|
||||||
|
addr.sin_addr.s_addr = Common::swap32(ip_info.ip);
|
||||||
|
#endif
|
||||||
memset(addr.sin_zero, 0, 8);
|
memset(addr.sin_zero, 0, 8);
|
||||||
|
|
||||||
u8 data[0x20];
|
u8 data[0x20];
|
||||||
@ -1487,7 +1502,9 @@ u32 CWII_IPC_HLE_Device_net_ip_top::ExecuteCommandV(SIOCtlVBuffer& CommandBuffer
|
|||||||
|
|
||||||
bool CWII_IPC_HLE_Device_net_ip_top::IOCtlV(u32 CommandAddress)
|
bool CWII_IPC_HLE_Device_net_ip_top::IOCtlV(u32 CommandAddress)
|
||||||
{
|
{
|
||||||
u32 return_value = ExecuteCommandV(SIOCtlVBuffer(CommandAddress));
|
SIOCtlVBuffer buf(CommandAddress);
|
||||||
|
|
||||||
|
u32 return_value = ExecuteCommandV(buf);
|
||||||
Memory::Write_U32(return_value, CommandAddress + 4);
|
Memory::Write_U32(return_value, CommandAddress + 4);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user