diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/soc_u.cpp | 60 | ||||
| -rw-r--r-- | src/core/hle/service/soc_u.h | 2 |
2 files changed, 36 insertions, 26 deletions
diff --git a/src/core/hle/service/soc_u.cpp b/src/core/hle/service/soc_u.cpp index 6a2cab414..5b2a643d8 100644 --- a/src/core/hle/service/soc_u.cpp +++ b/src/core/hle/service/soc_u.cpp | |||
| @@ -2,38 +2,46 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <algorithm> | ||
| 6 | #include <cstring> | ||
| 7 | #include <unordered_map> | ||
| 8 | |||
| 9 | #include "common/assert.h" | ||
| 10 | #include "common/bit_field.h" | ||
| 11 | #include "common/common_types.h" | ||
| 5 | #include "common/logging/log.h" | 12 | #include "common/logging/log.h" |
| 13 | #include "common/scope_exit.h" | ||
| 6 | 14 | ||
| 7 | #ifdef _WIN32 | 15 | #include "core/hle/kernel/session.h" |
| 8 | #include <winsock2.h> | 16 | #include "core/hle/result.h" |
| 9 | #include <ws2tcpip.h> | 17 | #include "core/hle/service/soc_u.h" |
| 10 | 18 | #include "core/memory.h" | |
| 11 | // MinGW does not define several errno constants | ||
| 12 | #ifndef _MSC_VER | ||
| 13 | #define EBADMSG 104 | ||
| 14 | #define ENODATA 120 | ||
| 15 | #define ENOMSG 122 | ||
| 16 | #define ENOSR 124 | ||
| 17 | #define ENOSTR 125 | ||
| 18 | #define ETIME 137 | ||
| 19 | #define EIDRM 2001 | ||
| 20 | #define ENOLINK 2002 | ||
| 21 | #endif // _MSC_VER | ||
| 22 | 19 | ||
| 20 | #ifdef _WIN32 | ||
| 21 | #include <winsock2.h> | ||
| 22 | #include <ws2tcpip.h> | ||
| 23 | |||
| 24 | // MinGW does not define several errno constants | ||
| 25 | #ifndef _MSC_VER | ||
| 26 | #define EBADMSG 104 | ||
| 27 | #define ENODATA 120 | ||
| 28 | #define ENOMSG 122 | ||
| 29 | #define ENOSR 124 | ||
| 30 | #define ENOSTR 125 | ||
| 31 | #define ETIME 137 | ||
| 32 | #define EIDRM 2001 | ||
| 33 | #define ENOLINK 2002 | ||
| 34 | #endif // _MSC_VER | ||
| 23 | #else | 35 | #else |
| 24 | #include <sys/socket.h> | 36 | #include <cerrno> |
| 25 | #include <netinet/in.h> | 37 | #include <fcntl.h> |
| 26 | #include <netdb.h> | 38 | #include <netinet/in.h> |
| 27 | #include <arpa/inet.h> | 39 | #include <netdb.h> |
| 28 | #include <fcntl.h> | 40 | #include <poll.h> |
| 29 | #include <poll.h> | 41 | #include <sys/socket.h> |
| 42 | #include <unistd.h> | ||
| 30 | #endif | 43 | #endif |
| 31 | 44 | ||
| 32 | #include "common/scope_exit.h" | ||
| 33 | #include "core/hle/hle.h" | ||
| 34 | #include "core/hle/service/soc_u.h" | ||
| 35 | #include <unordered_map> | ||
| 36 | |||
| 37 | #ifdef _WIN32 | 45 | #ifdef _WIN32 |
| 38 | # define WSAEAGAIN WSAEWOULDBLOCK | 46 | # define WSAEAGAIN WSAEWOULDBLOCK |
| 39 | # define WSAEMULTIHOP -1 // Invalid dummy value | 47 | # define WSAEMULTIHOP -1 // Invalid dummy value |
diff --git a/src/core/hle/service/soc_u.h b/src/core/hle/service/soc_u.h index 483b3111b..a091f597c 100644 --- a/src/core/hle/service/soc_u.h +++ b/src/core/hle/service/soc_u.h | |||
| @@ -4,6 +4,8 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <string> | ||
| 8 | |||
| 7 | #include "core/hle/service/service.h" | 9 | #include "core/hle/service/service.h" |
| 8 | 10 | ||
| 9 | //////////////////////////////////////////////////////////////////////////////////////////////////// | 11 | //////////////////////////////////////////////////////////////////////////////////////////////////// |