mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 10:42:36 +01:00
pine: fix some warnings (#13904)
This commit is contained in:
parent
976a3ed3bf
commit
29f67448e9
11
3rdparty/pine/pine_server.h
vendored
11
3rdparty/pine/pine_server.h
vendored
@ -12,18 +12,20 @@
|
|||||||
#include <thread>
|
#include <thread>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#if _WIN32
|
#if _WIN32
|
||||||
#define read_portable(a, b, c) (recv(a, b, c, 0))
|
#define read_portable(a, b, c) (recv(a, b, ::narrow<int>(c), 0))
|
||||||
#define write_portable(a, b, c) (send(a, b, c, 0))
|
#define write_portable(a, b, c) (send(a, b, ::narrow<int>(c), 0))
|
||||||
#define close_portable(a) (closesocket(a))
|
#define close_portable(a) (closesocket(a))
|
||||||
#define bzero(b, len) (memset((b), '\0', (len)), (void)0)
|
#define bzero(b, len) (memset((b), '\0', (len)), (void)0)
|
||||||
#include <WinSock2.h>
|
#include <WinSock2.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#include <ws2tcpip.h>
|
||||||
#else
|
#else
|
||||||
#define read_portable(a, b, c) (read(a, b, c))
|
#define read_portable(a, b, c) (read(a, b, c))
|
||||||
#define write_portable(a, b, c) (write(a, b, c))
|
#define write_portable(a, b, c) (write(a, b, c))
|
||||||
#define close_portable(a) (close(a))
|
#define close_portable(a) (close(a))
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/un.h>
|
#include <sys/un.h>
|
||||||
|
#include <arpa/inet.h>
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
|
#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@ -533,7 +535,10 @@ namespace pine
|
|||||||
// yes very good windows s/sun/sin/g sure is fine
|
// yes very good windows s/sun/sin/g sure is fine
|
||||||
server.sin_family = AF_INET;
|
server.sin_family = AF_INET;
|
||||||
// localhost only
|
// localhost only
|
||||||
server.sin_addr.s_addr = inet_addr("127.0.0.1");
|
if (!inet_pton(server.sin_family, "127.0.0.1", &server.sin_addr.s_addr))
|
||||||
|
{
|
||||||
|
fmt::throw_exception("IPC: Failed to convert localhost");
|
||||||
|
}
|
||||||
server.sin_port = htons(Impl::get_port());
|
server.sin_port = htons(Impl::get_port());
|
||||||
|
|
||||||
if (bind(m_sock, (struct sockaddr*)&server, sizeof(server)) == SOCKET_ERROR)
|
if (bind(m_sock, (struct sockaddr*)&server, sizeof(server)) == SOCKET_ERROR)
|
||||||
|
Loading…
Reference in New Issue
Block a user