aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRechi <Rechi@users.noreply.github.com>2018-08-25 08:00:00 +0200
committerRechi <Rechi@users.noreply.github.com>2018-08-25 08:00:00 +0200
commitb5fa620ee1bc106390cd91b27804ea36c0935eb9 (patch)
treebabd21503af4fe9d13cae7308a474851eec56ac1 /lib
parent471a13a17714fce76c5ed26600bbe6003dcee7c5 (diff)
[libUPnP] fix device discovery on windows
Diffstat (limited to 'lib')
-rw-r--r--lib/libUPnP/Neptune/Source/System/Bsd/NptBsdSockets.cpp29
-rw-r--r--lib/libUPnP/patches/0045-platinum-win10-uwp-fixes.patch25
-rw-r--r--lib/libUPnP/patches/0047-neptune-fix-device-discovery-on-windows.patch49
3 files changed, 51 insertions, 52 deletions
diff --git a/lib/libUPnP/Neptune/Source/System/Bsd/NptBsdSockets.cpp b/lib/libUPnP/Neptune/Source/System/Bsd/NptBsdSockets.cpp
index b1dc45a52a..638446d776 100644
--- a/lib/libUPnP/Neptune/Source/System/Bsd/NptBsdSockets.cpp
+++ b/lib/libUPnP/Neptune/Source/System/Bsd/NptBsdSockets.cpp
@@ -131,48 +131,19 @@ static NPT_WinsockSystem& WinsockInitializer = NPT_WinsockSystem::Initializer;
#undef SetPort
#endif
-#ifndef TARGET_WINDOWS_STORE
-#if !defined(EWOULDBLOCK)
#define EWOULDBLOCK WSAEWOULDBLOCK
-#endif
-#if !defined(EINPROGRESS)
#define EINPROGRESS WSAEINPROGRESS
-#endif
-#if !defined(ECONNREFUSED)
#define ECONNREFUSED WSAECONNREFUSED
-#endif
-#if !defined(ECONNABORTED)
#define ECONNABORTED WSAECONNABORTED
-#endif
-#if !defined(ECONNRESET)
#define ECONNRESET WSAECONNRESET
-#endif
-#if !defined(ETIMEDOUT)
#define ETIMEDOUT WSAETIMEDOUT
-#endif
-#if !defined(ENETRESET)
#define ENETRESET WSAENETRESET
-#endif
-#if !defined(EADDRINUSE)
#define EADDRINUSE WSAEADDRINUSE
-#endif
-#if !defined(ENETDOWN)
#define ENETDOWN WSAENETDOWN
-#endif
-#if !defined(ENETUNREACH)
#define ENETUNREACH WSAENETUNREACH
-#endif
-#if !defined(EHOSTUNREACH)
-#define EHOSTUNREACH WSAEHOSTUNREACH
-#endif
-#if !defined(ENOTCONN)
#define ENOTCONN WSAENOTCONN
-#endif
-#endif
#if !defined(EAGAIN)
#define EAGAIN WSAEWOULDBLOCK
-#endif
-#if !defined(EINTR)
#define EINTR WSAEINTR
#endif
#if !defined(SHUT_RDWR)
diff --git a/lib/libUPnP/patches/0045-platinum-win10-uwp-fixes.patch b/lib/libUPnP/patches/0045-platinum-win10-uwp-fixes.patch
index e2f706d9fe..22034321a2 100644
--- a/lib/libUPnP/patches/0045-platinum-win10-uwp-fixes.patch
+++ b/lib/libUPnP/patches/0045-platinum-win10-uwp-fixes.patch
@@ -7,14 +7,13 @@ Subject: [PATCH] [win10] uwp fixes libUPnP
lib/libUPnP/Neptune/Source/Core/NptConfig.h | 13 ++++++++++
lib/libUPnP/Neptune/Source/Core/NptUtils.cpp | 30 ++++++++++++++++++++++
lib/libUPnP/Neptune/Source/Core/NptUtils.h | 7 +++++
- .../Neptune/Source/System/Bsd/NptBsdSockets.cpp | 2 ++
.../Source/System/StdC/NptStdcEnvironment.cpp | 2 +-
.../System/Win32/NptWin32DynamicLibraries.cpp | 4 +++
.../Source/System/Win32/NptWin32MessageQueue.cpp | 3 ++-
.../Source/System/Win32/NptWin32MessageQueue.h | 3 +++
.../Neptune/Source/System/Win32/NptWin32Queue.cpp | 6 ++---
.../Source/System/Win32/NptWin32SerialPort.cpp | 2 ++
- 10 files changed, 67 insertions(+), 5 deletions(-)
+ 9 files changed, 65 insertions(+), 5 deletions(-)
diff --git a/lib/libUPnP/Neptune/Source/Core/NptConfig.h b/lib/libUPnP/Neptune/Source/Core/NptConfig.h
index d51f67f94e..130d5cc33b 100644
@@ -121,26 +120,6 @@ index 3a06d497f4..89b2e29812 100644
+#endif
+
#endif // _NPT_UTILS_H_
-diff --git a/lib/libUPnP/Neptune/Source/System/Bsd/NptBsdSockets.cpp b/lib/libUPnP/Neptune/Source/System/Bsd/NptBsdSockets.cpp
-index ee86dbf4b0..a42dfbfb85 100644
---- a/lib/libUPnP/Neptune/Source/System/Bsd/NptBsdSockets.cpp
-+++ b/lib/libUPnP/Neptune/Source/System/Bsd/NptBsdSockets.cpp
-@@ -131,6 +131,7 @@ static NPT_WinsockSystem& WinsockInitializer = NPT_WinsockSystem::Initializer;
- #undef SetPort
- #endif
-
-+#ifndef TARGET_WINDOWS_STORE
- #if !defined(EWOULDBLOCK)
- #define EWOULDBLOCK WSAEWOULDBLOCK
- #endif
-@@ -167,6 +168,7 @@ static NPT_WinsockSystem& WinsockInitializer = NPT_WinsockSystem::Initializer;
- #if !defined(ENOTCONN)
- #define ENOTCONN WSAENOTCONN
- #endif
-+#endif
- #if !defined(EAGAIN)
- #define EAGAIN WSAEWOULDBLOCK
- #endif
diff --git a/lib/libUPnP/Neptune/Source/System/StdC/NptStdcEnvironment.cpp b/lib/libUPnP/Neptune/Source/System/StdC/NptStdcEnvironment.cpp
index c9f9939d2b..f700b2212b 100644
--- a/lib/libUPnP/Neptune/Source/System/StdC/NptStdcEnvironment.cpp
@@ -254,6 +233,6 @@ index 9428648bd7..4dfc23a603 100644
m_Delegate = new NPT_Win32SerialPort(name);
}
+#endif // ! TARGET_WINDOWS_STORE
---
+--
2.13.2.windows.1
diff --git a/lib/libUPnP/patches/0047-neptune-fix-device-discovery-on-windows.patch b/lib/libUPnP/patches/0047-neptune-fix-device-discovery-on-windows.patch
new file mode 100644
index 0000000000..391ee3b302
--- /dev/null
+++ b/lib/libUPnP/patches/0047-neptune-fix-device-discovery-on-windows.patch
@@ -0,0 +1,49 @@
+--- a/lib/libUPnP/Neptune/Source/System/Bsd/NptBsdSockets.cpp
++++ b/lib/libUPnP/Neptune/Source/System/Bsd/NptBsdSockets.cpp
+@@ -131,46 +131,19 @@
+ #undef SetPort
+ #endif
+
+-#if !defined(EWOULDBLOCK)
+ #define EWOULDBLOCK WSAEWOULDBLOCK
+-#endif
+-#if !defined(EINPROGRESS)
+ #define EINPROGRESS WSAEINPROGRESS
+-#endif
+-#if !defined(ECONNREFUSED)
+ #define ECONNREFUSED WSAECONNREFUSED
+-#endif
+-#if !defined(ECONNABORTED)
+ #define ECONNABORTED WSAECONNABORTED
+-#endif
+-#if !defined(ECONNRESET)
+ #define ECONNRESET WSAECONNRESET
+-#endif
+-#if !defined(ETIMEDOUT)
+ #define ETIMEDOUT WSAETIMEDOUT
+-#endif
+-#if !defined(ENETRESET)
+ #define ENETRESET WSAENETRESET
+-#endif
+-#if !defined(EADDRINUSE)
+ #define EADDRINUSE WSAEADDRINUSE
+-#endif
+-#if !defined(ENETDOWN)
+ #define ENETDOWN WSAENETDOWN
+-#endif
+-#if !defined(ENETUNREACH)
+ #define ENETUNREACH WSAENETUNREACH
+-#endif
+-#if !defined(EHOSTUNREACH)
+-#define EHOSTUNREACH WSAEHOSTUNREACH
+-#endif
+-#if !defined(ENOTCONN)
+ #define ENOTCONN WSAENOTCONN
+-#endif
+ #if !defined(EAGAIN)
+ #define EAGAIN WSAEWOULDBLOCK
+-#endif
+-#if !defined(EINTR)
+ #define EINTR WSAEINTR
+ #endif
+ #if !defined(SHUT_RDWR)