[vlc-devel] [PATCH] upnp: patches for Solaris (via opencsw)
Sean McGovern
gseanmcg at gmail.com
Sat Jul 26 02:20:15 CEST 2014
---
contrib/src/upnp/add-includes-for-solaris.patch | 25 +++++++++++++++++
contrib/src/upnp/rules.mak | 10 +++++++
.../use-inttypes-if-stdint-is-not-available.patch | 28 ++++++++++++++++++++
3 files changed, 63 insertions(+)
create mode 100644 contrib/src/upnp/add-includes-for-solaris.patch
create mode 100644 contrib/src/upnp/use-inttypes-if-stdint-is-not-available.patch
diff --git a/contrib/src/upnp/add-includes-for-solaris.patch b/contrib/src/upnp/add-includes-for-solaris.patch
new file mode 100644
index 0000000..02446d7
--- /dev/null
+++ b/contrib/src/upnp/add-includes-for-solaris.patch
@@ -0,0 +1,25 @@
+From b2d7dc97a2498339e01cc2799e6e27640f83cca2 Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Thu, 1 Mar 2012 13:43:07 +0100
+Subject: [PATCH] Add includes for Solaris
+
+---
+ upnp/inc/UpnpInet.h | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/upnp/inc/UpnpInet.h b/upnp/inc/UpnpInet.h
+index 6269c4a..a51cdc5 100644
+--- a/upnp/inc/UpnpInet.h
++++ b/upnp/inc/UpnpInet.h
+@@ -30,6 +30,8 @@
+ #if defined(__sun)
+ #include <fcntl.h>
+ #include <sys/sockio.h>
++ #include <sys/types.h>
++ #include <sys/socket.h>
+ #elif (defined(BSD) && BSD >= 199306) || defined (__FreeBSD_kernel__)
+ #include <ifaddrs.h>
+ /* Do not move or remove the include below for "sys/socket"!
+--
+1.7.9
+
diff --git a/contrib/src/upnp/rules.mak b/contrib/src/upnp/rules.mak
index f6706b1..17d9253 100644
--- a/contrib/src/upnp/rules.mak
+++ b/contrib/src/upnp/rules.mak
@@ -15,6 +15,9 @@ ifdef HAVE_WIN32
DEPS_upnp += pthreads $(DEPS_pthreads)
LIBUPNP_ECFLAGS = -DPTW32_STATIC_LIB
endif
+ifdef HAVE_SOLARIS
+LIBUPNP_ECFLAGS = -D_POSIX_PTHREAD_SEMANTICS
+endif
upnp: libupnp-$(UPNP_VERSION).tar.bz2 .sum-upnp
$(UNPACK)
@@ -25,6 +28,10 @@ ifdef HAVE_WIN32
endif
$(APPLY) $(SRC)/upnp/libupnp-ipv6.patch
$(APPLY) $(SRC)/upnp/miniserver.patch
+ifdef HAVE_SOLARIS
+ $(APPLY) $(SRC)/upnp/add-includes-for-solaris.patch
+ $(APPLY) $(SRC)/upnp/use-inttypes-if-stdint-is-not-available.patch
+endif
$(UPDATE_AUTOCONFIG) && cd $(UNPACK_DIR) && mv config.guess config.sub build-aux/
$(MOVE)
@@ -32,6 +39,9 @@ endif
ifdef HAVE_WIN32
$(RECONF)
endif
+ifdef HAVE_SOLARIS
+ $(RECONF)
+endif
cd $< && $(HOSTVARS) CFLAGS="$(CFLAGS) -DUPNP_STATIC_LIB $(LIBUPNP_ECFLAGS)" ./configure --disable-samples --without-documentation --enable-ipv6 $(HOSTCONF)
cd $< && $(MAKE) install
touch $@
diff --git a/contrib/src/upnp/use-inttypes-if-stdint-is-not-available.patch b/contrib/src/upnp/use-inttypes-if-stdint-is-not-available.patch
new file mode 100644
index 0000000..73d85ee
--- /dev/null
+++ b/contrib/src/upnp/use-inttypes-if-stdint-is-not-available.patch
@@ -0,0 +1,28 @@
+From b32cacc18632995c2ac265eb323b30e2c2ee1b56 Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Thu, 1 Mar 2012 14:09:24 +0100
+Subject: [PATCH] Use inttypes.h if stdint.h is not available
+
+---
+ upnp/inc/UpnpStdInt.h | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/upnp/inc/UpnpStdInt.h b/upnp/inc/UpnpStdInt.h
+index 9256f57..f87c095 100644
+--- a/upnp/inc/UpnpStdInt.h
++++ b/upnp/inc/UpnpStdInt.h
+@@ -4,7 +4,11 @@
+ #if !defined(UPNP_USE_BCBPP)
+
+ /* Sized integer types. */
++#if defined( HAVE_STDINT_H )
+ #include <stdint.h>
++#elif defined( HAVE_INTTYPES_H )
++#include <inttypes.h>
++#endif
+
+ #ifdef UPNP_USE_MSVCPP
+ /* no ssize_t defined for VC */
+--
+1.7.9
+
--
1.7.9.2
More information about the vlc-devel
mailing list