aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartijn Kaijser <martijn@xbmc.org>2018-08-26 11:16:01 +0200
committerGitHub <noreply@github.com>2018-08-26 11:16:01 +0200
commit3f0facee65a1339c3578ff302bf9e51127c1706d (patch)
treea7bf28692140c6104316a0ba050787e32166f218
parentf99b6520a75965363efbe70113bd4d15c5dda8db (diff)
parentb5fa620ee1bc106390cd91b27804ea36c0935eb9 (diff)
Merge pull request #14347 from Rechi/fix/upnp
[libUPnP] fix device discovery on windows
-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 752c1d4301..22034321a2 100644
--- a/lib/libUPnP/patches/0045-platinum-win10-uwp-fixes.patch
+++ b/lib/libUPnP/patches/0045-platinum-win10-uwp-fixes.patch
@@ -4,17 +4,16 @@ Date: Fri, 2 Jun 2017 16:34:58 +0300
Subject: [PATCH] [win10] uwp fixes libUPnP
---
- lib/libUPnP/CMakeLists.txt | 8 ++++--
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, 70 insertions(+), 4 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
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)