]> git.sesse.net Git - vlc/commitdiff
Contribs: Upnp, update to 1.6.12
authorJean-Baptiste Kempf <jb@videolan.org>
Thu, 10 Feb 2011 22:56:32 +0000 (23:56 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 10 Feb 2011 22:56:32 +0000 (23:56 +0100)
extras/contrib/src/Patches/libupnp-configure.patch
extras/contrib/src/Patches/libupnp-mingw.patch [deleted file]
extras/contrib/src/Patches/libupnp-win32.patch
extras/contrib/src/contrib-src.mak
extras/contrib/src/packages.mak

index 1dd5d6691dfde196624551a04bf642f317a2d968..dbc14cca5e50f88e22edf19da1cace37abfe3edf 100644 (file)
@@ -1,6 +1,6 @@
---- libupnp/configure.ac       2008-04-25 13:41:16.000000000 +0200
-+++ libupnp_new/configure.ac   2010-08-13 23:21:00.000000000 +0200
-@@ -286,7 +286,6 @@
+--- libupnp/configure.ac.orig  2011-02-09 00:55:44.000000000 +0100
++++ libupnp/configure.ac       2011-02-10 23:39:44.154929678 +0100
+@@ -397,7 +397,6 @@
  AC_PROG_MAKE_SET
  AC_PROG_EGREP
  
@@ -8,36 +8,7 @@
  # Default compilation flags
  #
  echo "--------------------- Default compilation flags -------------------------------"
-@@ -332,19 +331,13 @@
- # so just abort if a header file is not found.
- AC_CHECK_HEADERS(
-       [ \
--      arpa/inet.h \
-       fcntl.h \
-       inttypes.h \
-       limits.h \
--      netdb.h \
--      netinet/in.h \
-       stdlib.h \
-       string.h \
--      sys/ioctl.h \
--      sys/socket.h \
-       sys/time.h \
-       sys/timeb.h \
--      syslog.h \
-       unistd.h \
-       ],
-       [],
-@@ -355,7 +348,7 @@
- # Checks for typedefs, structures, and compiler characteristics
- #     
- AC_C_CONST
--TYPE_SOCKLEN_T
-+#TYPE_SOCKLEN_T
- #
-@@ -370,39 +363,46 @@
+@@ -531,39 +530,46 @@
  # Checks for POSIX Threads
  #
  echo "--------------------------- pthread stuff -------------------------------------"
  
  
  AC_CONFIG_FILES([
---- libupnp/libupnp.pc.in      2008-02-10 02:55:39.000000000 +0100
-+++ libupnp.new/libupnp.pc.in  2010-08-24 18:08:41.000000000 +0200
-@@ -6,6 +6,6 @@
- Name: libupnp
- Description: Linux SDK for UPnP Devices
- Version: @VERSION@
--Libs: @PTHREAD_LIBS@ -L${libdir} -lupnp -lthreadutil -lixml 
-+Libs: -L${libdir} -lupnp -lthreadutil -lixml @PTHREAD_LIBS@ 
- Cflags: @PTHREAD_CFLAGS@ -I${includedir}/upnp
diff --git a/extras/contrib/src/Patches/libupnp-mingw.patch b/extras/contrib/src/Patches/libupnp-mingw.patch
deleted file mode 100644 (file)
index 596e8b7..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
---- libupnp.old/upnp/inc/upnp.h        2008-03-09 01:54:58.000000000 +0100
-+++ libupnp/upnp/inc/upnp.h    2010-08-11 12:40:37.000000000 +0200
-@@ -74,14 +74,16 @@
-               typedef __int64 int64_t;
-               #define PRId64 "I64d"
-               #define PRIzu "lu"
--      #endif
--      #ifdef UPNP_USE_BCBPP
-+      #elif defined UPNP_USE_BCBPP
-               /* define some things Borland Builder doesn't know */
-               #define UPNP_INLINE inline
-               typedef __int64 int64_t;
- #warning The Borland C compiler is probably broken on PRId64, please someone provide a proper fix here
-               #define PRId64 "I64d"
-               #define PRIzu "zu"
-+      #else
-+              #define UPNP_INLINE inline
-+              #define PRIzu "zu"
-       #endif
- #else
-       #define EXPORT_SPEC
---- libupnp.old/upnp/src/inc/unixutil.h        2008-02-10 02:55:34.000000000 +0100
-+++ libupnp/upnp/src/inc/unixutil.h    2010-08-11 12:48:37.000000000 +0200
-@@ -38,7 +38,15 @@
- #ifndef WIN32
-       #include <sys/socket.h>
- #else
--      typedef int socklen_t;
-+      //typedef int socklen_t;
-+      #if !defined(UNDER_CE)
-+      #    define _NO_OLDNAMES 1
-+      #    include <io.h>
-+      #endif
-+      #include <winsock2.h>
-+      #include <ws2tcpip.h>
-+      #define ENETUNREACH WSAENETUNREACH
-+      #define net_errno (WSAGetLastError())
-       #define EAFNOSUPPORT 97
- #endif
-diff -ruN libupnp/threadutil/inc/ithread.h libupnp.new/threadutil/inc/ithread.h
---- libupnp/threadutil/inc/ithread.h   2008-03-22 17:36:03.000000000 +0100
-+++ libupnp.new/threadutil/inc/ithread.h       2010-11-02 15:33:43.544547707 +0100
-@@ -35,7 +35,7 @@
- extern "C" {
- #endif
--
-+#undef HAVE_CONFIG_H
- #include <pthread.h>
- #ifndef WIN32
-       #include <unistd.h>
index 17f49ab85fc5c51056577de73bf81582189fcf5d..856bae8c9ce57b405dbecb011baf65bc228c77fc 100644 (file)
---- libupnp/upnp/Makefile.am   2008-02-10 02:55:34.000000000 +0100
-+++ libupnp.new/upnp/Makefile.am       2010-08-24 18:40:58.000000000 +0200
-@@ -123,6 +123,7 @@
- libupnp_la_SOURCES += \
-       src/uuid/md5.c \
-       src/uuid/sysdep.c \
-+      src/inet_pton.c \
-       src/uuid/uuid.c
-diff -ruN libupnp/upnp/src/genlib/miniserver/miniserver.c libupnp.new/upnp/src/genlib/miniserver/miniserver.c
---- libupnp/upnp/src/genlib/miniserver/miniserver.c    2008-03-21 00:07:50.000000000 +0100
-+++ libupnp.new/upnp/src/genlib/miniserver/miniserver.c        2010-08-24 18:34:44.000000000 +0200
-@@ -419,9 +419,8 @@
-         ret = select( maxMiniSock, &rdSet, NULL, &expSet, NULL );
-         if ( ret == -1 ) {
--            strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
-             UpnpPrintf( UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
--                "Error in select(): %s\n", errorBuffer );
-+                "Error in select(): %i\n", errno );
-           /* Avoid 100% CPU in case of repeated error in select() */
-           isleep( 1 );
-             continue;
-@@ -431,9 +430,8 @@
-                 connectHnd = accept( miniServSock,
-                     ( struct sockaddr * )&clientAddr, &clientLen );
-                 if( connectHnd == -1 ) {
--                    strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
-                     UpnpPrintf( UPNP_INFO, MSERV, __FILE__, __LINE__,
--                        "miniserver: Error in accept(): %s\n", errorBuffer );
-+                        "miniserver: Error in accept(): %i\n", errno );
-                     continue;
-                 }
-                 schedule_request_job( connectHnd, &clientAddr );
-@@ -616,9 +614,8 @@
-     }
-     if ( sockError == -1 ) {
--        strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
-         UpnpPrintf( UPNP_INFO, MSERV, __FILE__, __LINE__,
--            "mserv start: Error in bind(): %s\n", errorBuffer );
-+            "mserv start: Error in bind(): %i\n", errno );
-         shutdown( listenfd, SD_BOTH );
-         UpnpCloseSocket( listenfd );
-@@ -630,9 +627,8 @@
-     success = listen( listenfd, SOMAXCONN );
-     if ( success == -1 ) {
--        strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
-         UpnpPrintf( UPNP_INFO, MSERV, __FILE__, __LINE__,
--            "mserv start: Error in listen(): %s\n", errorBuffer );
-+            "mserv start: Error in listen(): %i\n", errno );
-         shutdown( listenfd, SD_BOTH );
-         UpnpCloseSocket( listenfd );
-@@ -651,9 +647,8 @@
-     miniServerStopSock = socket( AF_INET, SOCK_DGRAM, 0 );
-     if ( miniServerStopSock == -1 ) {
--        strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
-         UpnpPrintf( UPNP_CRITICAL, MSERV, __FILE__, __LINE__,
--            "Error in socket(): %s\n", errorBuffer );
-+            "Error in socket(): %i\n", errno );
-         shutdown( listenfd, SD_BOTH );
-         UpnpCloseSocket( listenfd );
-@@ -827,9 +822,8 @@
-     sock = socket( AF_INET, SOCK_DGRAM, 0 );
-     if ( sock == -1 ) {
--        strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
-         UpnpPrintf( UPNP_INFO, SSDP, __FILE__, __LINE__,
--            "SSDP_SERVER: StopSSDPServer: Error in socket() %s\n", errorBuffer );
-+            "SSDP_SERVER: StopSSDPServer: Error in socket() %i\n", errno );
-         return 0;
-     }
-diff -ruN libupnp/upnp/src/inet_pton.c libupnp.new/upnp/src/inet_pton.c
---- libupnp/upnp/src/inet_pton.c       2008-02-10 02:55:34.000000000 +0100
-+++ libupnp.new/upnp/src/inet_pton.c   2010-08-24 18:41:08.000000000 +0200
-@@ -35,7 +35,6 @@
-  * sizeof(int) < 4.  sizeof(int) 4 is fine; all the world's not a VAX.
-  */
--
- /* const char *
-  * inet_ntop4(src, dst, size)
-  *    format an IPv4 address
-@@ -386,4 +385,4 @@
-       }
-       /* NOTREACHED */
- }
--#endif
-\ Pas de fin de ligne à la fin du fichier.
-+#endif
-diff -ruN libupnp/upnp/src/ssdp/ssdp_ctrlpt.c libupnp.new/upnp/src/ssdp/ssdp_ctrlpt.c
---- libupnp/upnp/src/ssdp/ssdp_ctrlpt.c        2008-03-22 17:36:03.000000000 +0100
-+++ libupnp.new/upnp/src/ssdp/ssdp_ctrlpt.c    2010-08-24 18:32:47.000000000 +0200
-@@ -595,10 +595,9 @@
-     ret = select( gSsdpReqSocket + 1, NULL, &wrSet, NULL, NULL );
-     if( ret == -1 ) {
--        strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
-         UpnpPrintf( UPNP_INFO, SSDP, __FILE__, __LINE__,
--            "SSDP_LIB: Error in select(): %s\n",
--            errorBuffer );
-+            "SSDP_LIB: Error in select(): %i\n",
-+            errno );
-       shutdown( gSsdpReqSocket, SD_BOTH );
-         UpnpCloseSocket( gSsdpReqSocket );
-         free( ReqBuf );
-diff -ruN libupnp/upnp/src/ssdp/ssdp_device.c libupnp.new/upnp/src/ssdp/ssdp_device.c
---- libupnp/upnp/src/ssdp/ssdp_device.c        2008-03-21 00:27:26.000000000 +0100
-+++ libupnp.new/upnp/src/ssdp/ssdp_device.c    2010-08-24 18:36:22.000000000 +0200
-@@ -227,10 +227,9 @@
-     ReplySock = socket( AF_INET, SOCK_DGRAM, 0 );
-     if ( ReplySock == -1 ) {
--        strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
-         UpnpPrintf( UPNP_INFO, SSDP, __FILE__, __LINE__,
-             "SSDP_LIB: New Request Handler:"
--            "Error in socket(): %s\n", errorBuffer );
-+            "Error in socket(): %i\n", errno );
-         return UPNP_E_OUTOF_SOCKET;
-     }
-diff -ruN libupnp/upnp/src/ssdp/ssdp_server.c libupnp.new/upnp/src/ssdp/ssdp_server.c
---- libupnp/upnp/src/ssdp/ssdp_server.c        2008-03-21 00:08:25.000000000 +0100
-+++ libupnp.new/upnp/src/ssdp/ssdp_server.c    2010-08-24 18:30:28.000000000 +0200
-@@ -876,9 +876,8 @@
-     ssdpReqSock = socket( AF_INET, SOCK_DGRAM, 0 );
-     if ( ssdpReqSock == -1 ) {
--        strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
-         UpnpPrintf( UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
--            "Error in socket(): %s\n", errorBuffer );
-+            "Error in socket(): %i\n", errno );
-             return UPNP_E_OUTOF_SOCKET;
-     }
-@@ -891,9 +890,8 @@
-     ssdpSock = socket( AF_INET, SOCK_DGRAM, 0 );
-     if ( ssdpSock == -1 ) {
--        strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
-         UpnpPrintf( UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
--            "Error in socket(): %s\n", errorBuffer );
-+            "Error in socket(): %i\n", errno );
-         CLIENTONLY( shutdown( ssdpReqSock, SD_BOTH ); )
-         CLIENTONLY( UpnpCloseSocket( ssdpReqSock ); )
-@@ -904,9 +902,8 @@
-     ret = setsockopt( ssdpSock, SOL_SOCKET, SO_REUSEADDR,
-         (char *)&onOff, sizeof(onOff) );
-     if ( ret == -1) {
--        strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
-         UpnpPrintf( UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
--            "Error in setsockopt() SO_REUSEADDR: %s\n", errorBuffer );
-+            "Error in setsockopt() SO_REUSEADDR: %i\n", errno );
-         CLIENTONLY( shutdown( ssdpReqSock, SD_BOTH ); )
-         CLIENTONLY( UpnpCloseSocket( ssdpReqSock ); )
-         shutdown( ssdpSock, SD_BOTH );
-@@ -919,9 +916,8 @@
-     ret = setsockopt( ssdpSock, SOL_SOCKET, SO_REUSEPORT,
-         (char *)&onOff, sizeof (onOff) );
-     if ( ret == -1 ) {
--        strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
-         UpnpPrintf( UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
--            "Error in setsockopt() SO_REUSEPORT: %s\n", errorBuffer );
-+            "Error in setsockopt() SO_REUSEPORT: %i\n", errno );
-         CLIENTONLY( shutdown( ssdpReqSock, SD_BOTH ); )
-         CLIENTONLY( UpnpCloseSocket( ssdpReqSock ); )
-         shutdown( ssdpSock, SD_BOTH );
-@@ -938,10 +934,9 @@
-     ssdpAddr.sin_port = htons( SSDP_PORT );
-     ret = bind( ssdpSock, (struct sockaddr *)&ssdpAddr, sizeof (ssdpAddr) );
-     if ( ret == -1 ) {
--        strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
-         UpnpPrintf( UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
--            "Error in bind(), addr=0x%08X, port=%d: %s\n",
--            INADDR_ANY, SSDP_PORT, errorBuffer );
-+            "Error in bind(), addr=0x%08X, port=%d: %i\n",
-+            INADDR_ANY, SSDP_PORT, errno );
-             shutdown( ssdpSock, SD_BOTH );
-         UpnpCloseSocket( ssdpSock );
-         CLIENTONLY( shutdown( ssdpReqSock, SD_BOTH ); )
-@@ -956,10 +950,9 @@
-     ret = setsockopt( ssdpSock, IPPROTO_IP, IP_ADD_MEMBERSHIP,
-         (char *)&ssdpMcastAddr, sizeof (struct ip_mreq) );
-     if ( ret == -1 ) {
--        strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
-         UpnpPrintf( UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
--            "Error in setsockopt() IP_ADD_MEMBERSHIP (join multicast group): %s\n",
--            errorBuffer );
-+            "Error in setsockopt() IP_ADD_MEMBERSHIP (join multicast group): %i\n",
-+            errno );
-         shutdown( ssdpSock, SD_BOTH );
-         CLIENTONLY( shutdown( ssdpReqSock, SD_BOTH ); )
-         UpnpCloseSocket( ssdpSock );
-@@ -974,10 +967,9 @@
-     ret = setsockopt(ssdpSock, IPPROTO_IP, IP_MULTICAST_IF,
-         (char *)&addr, sizeof addr);
-     if ( ret == -1 ) {
--        strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
-         UpnpPrintf( UPNP_INFO, SSDP, __FILE__, __LINE__,
--            "Error in setsockopt() IP_MULTICAST_IF (set multicast interface): %s\n",
--            errorBuffer );
-+            "Error in setsockopt() IP_MULTICAST_IF (set multicast interface): %i\n",
-+            errno );
-         /* This is probably not a critical error, so let's continue. */
-     }
-@@ -988,10 +980,9 @@
-     ret = setsockopt( ssdpSock, SOL_SOCKET, SO_BROADCAST,
-         (char *)&option, sizeof (option) );
-     if( ret == -1) {
--        strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
-         UpnpPrintf( UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
--            "Error in setsockopt() SO_BROADCAST (set broadcast): %s\n",
--            errorBuffer );
-+            "Error in setsockopt() SO_BROADCAST (set broadcast): %i\n",
-+            errno );
-         shutdown( ssdpSock, SD_BOTH );
-         CLIENTONLY( shutdown( ssdpReqSock, SD_BOTH ); )
-         UpnpCloseSocket( ssdpSock );
+--- libupnp/configure.ac.orig  2011-02-10 23:53:25.000000000 +0100
++++ libupnp/configure.ac       2011-02-10 23:54:23.574454501 +0100
+@@ -546,6 +546,7 @@
+ AC_SUBST(PTHREAD_CFLAGS)
+ AC_SUBST(PTHREAD_CC)
++AC_DEFINE([_WIN32_WINNT], 0x0501, [Define to '0x0500' for Windows 2000 APIs.])
+ #
+ # Determine if pthread_rwlock_t is available
+ #
index 44c10f8b04d1e81ed1a86881421fbb23449191f7..87675f5de73030601a4f6ecd0acd33ce03d5cb0d 100644 (file)
@@ -2452,10 +2452,9 @@ libupnp-$(UPNP_VERSION).tar.bz2:
 
 libupnp: libupnp-$(UPNP_VERSION).tar.bz2
        $(EXTRACT_BZ2)
-       patch -p0 < Patches/libupnp-mingw.patch
 ifdef HAVE_WIN32
-       patch -p0 < Patches/libupnp-win32.patch
        patch -p0 < Patches/libupnp-configure.patch
+       patch -p0 < Patches/libupnp-win32.patch
        cd $@; libtoolize&& autoreconf
 endif
 
index 0eb0257baebfc7a4942cdac7ec476fc0a32c8bdf..6a39eb871e5edd36e663031d9b14a3fcfa0bf655 100644 (file)
@@ -189,8 +189,8 @@ PORTAUDIO_VERSION=19
 PORTAUDIO_URL=http://www.portaudio.com/archives/pa_snapshot_v$(PORTAUDIO_VERSION).tar.gz
 CLINKCC_VERSION=171
 CLINKCC_URL=$(SF)/clinkcc/clinkcc$(CLINKCC_VERSION).tar.gz
-UPNP_VERSION=1.6.6
-UPNP_URL=$(CONTRIB_VIDEOLAN)/libupnp-$(UPNP_VERSION).tar.bz2
+UPNP_VERSION=1.6.12
+UPNP_URL=$(SF)/pupnp/libupnp-$(UPNP_VERSION).tar.bz2
 EXPAT_VERSION=2.0.0
 EXPAT_URL=$(SF)/expat/expat-$(EXPAT_VERSION).tar.gz
 PTHREADS_VERSION=2-8-0