]> git.sesse.net Git - vlc/blob - extras/contrib/src/Patches/libupnp-mingw.patch
Contribs: port libupnp to mingw and make it compile
[vlc] / extras / contrib / src / Patches / libupnp-mingw.patch
1 --- libupnp.old/upnp/inc/upnp.h 2008-03-09 01:54:58.000000000 +0100
2 +++ libupnp/upnp/inc/upnp.h     2010-08-11 12:40:37.000000000 +0200
3 @@ -74,14 +74,16 @@
4                 typedef __int64 int64_t;
5                 #define PRId64 "I64d"
6                 #define PRIzu "lu"
7 -       #endif
8 -       #ifdef UPNP_USE_BCBPP
9 +       #elif defined UPNP_USE_BCBPP
10                 /* define some things Borland Builder doesn't know */
11                 #define UPNP_INLINE inline
12                 typedef __int64 int64_t;
13  #warning The Borland C compiler is probably broken on PRId64, please someone provide a proper fix here
14                 #define PRId64 "I64d"
15                 #define PRIzu "zu"
16 +       #else
17 +               #define UPNP_INLINE inline
18 +               #define PRIzu "zu"
19         #endif
20  #else
21         #define EXPORT_SPEC
22 --- libupnp.old/upnp/src/inc/unixutil.h 2008-02-10 02:55:34.000000000 +0100
23 +++ libupnp/upnp/src/inc/unixutil.h     2010-08-11 12:48:37.000000000 +0200
24 @@ -38,7 +38,15 @@
25  #ifndef WIN32
26         #include <sys/socket.h>
27  #else
28 -       typedef int socklen_t;
29 +       //typedef int socklen_t;
30 +       #if !defined(UNDER_CE)
31 +       #    define _NO_OLDNAMES 1
32 +       #    include <io.h>
33 +       #endif
34 +       #include <winsock2.h>
35 +       #include <ws2tcpip.h>
36 +       #define ENETUNREACH WSAENETUNREACH
37 +       #define net_errno (WSAGetLastError())
38         #define EAFNOSUPPORT 97
39  #endif
40