[vlc-commits] contrib: patch live555 for android

Rafaël Carré git at videolan.org
Thu Jan 19 23:42:01 CET 2012


vlc/vlc-1.2 | branch: master | Rafaël Carré <funman at videolan.org> | Thu Jan 19 17:01:27 2012 -0500| [8151c90c68a27ab8e7bc3b4773acab16c7c2df21] | committer: Jean-Baptiste Kempf

contrib: patch live555 for android
(cherry picked from commit 291dcb1f2b09840a23cf71762f1d7ef75669d22d)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.2.git/?a=commit;h=8151c90c68a27ab8e7bc3b4773acab16c7c2df21
---

 contrib/src/live555/android.patch |   54 +++++++++++++++++++++++++++++++++++++
 contrib/src/live555/rules.mak     |    3 ++
 2 files changed, 57 insertions(+), 0 deletions(-)

diff --git a/contrib/src/live555/android.patch b/contrib/src/live555/android.patch
new file mode 100644
index 0000000..621675a
--- /dev/null
+++ b/contrib/src/live555/android.patch
@@ -0,0 +1,54 @@
+diff -ur live555.orig/config.armlinux live555/config.armlinux
+--- live555.orig/config.armlinux	2012-01-19 16:56:57.026348234 -0500
++++ live555/config.armlinux	2012-01-19 16:57:42.806348231 -0500
+@@ -1,5 +1,5 @@
+-CROSS_COMPILE?=		arm-elf-
+-COMPILE_OPTS =		$(INCLUDES) -I. -O2 -DSOCKLEN_T=socklen_t -DNO_SSTREAM=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64
++CROSS_COMPILE?=		arm-linux-androideabi-
++COMPILE_OPTS =     $(INCLUDES) -I. -O2 -DSOCKLEN_T=socklen_t -DNO_SSTREAM=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -I$(ANDROID_NDK)/platforms/android-9/arch-arm/usr/include -DLOCALE_NOT_USED
+ C =			c
+ C_COMPILER =		$(CROSS_COMPILE)gcc
+ C_FLAGS =		$(COMPILE_OPTS)
+diff -ur live555.orig/groupsock/GroupsockHelper.cpp live555/groupsock/GroupsockHelper.cpp
+--- live555.orig/groupsock/GroupsockHelper.cpp	2012-01-19 16:56:57.026348234 -0500
++++ live555/groupsock/GroupsockHelper.cpp	2012-01-19 16:57:10.470348233 -0500
+@@ -466,9 +466,9 @@
+   if (!IsMulticastAddress(groupAddress)) return True; // ignore this case
+ 
+   struct ip_mreq_source imr;
+-  imr.imr_multiaddr.s_addr = groupAddress;
+-  imr.imr_sourceaddr.s_addr = sourceFilterAddr;
+-  imr.imr_interface.s_addr = ReceivingInterfaceAddr;
++  imr.imr_multiaddr = groupAddress;
++  imr.imr_sourceaddr = sourceFilterAddr;
++  imr.imr_interface = ReceivingInterfaceAddr;
+   if (setsockopt(socket, IPPROTO_IP, IP_ADD_SOURCE_MEMBERSHIP,
+ 		 (const char*)&imr, sizeof (struct ip_mreq_source)) < 0) {
+     socketErr(env, "setsockopt(IP_ADD_SOURCE_MEMBERSHIP) error: ");
+@@ -484,9 +484,9 @@
+   if (!IsMulticastAddress(groupAddress)) return True; // ignore this case
+ 
+   struct ip_mreq_source imr;
+-  imr.imr_multiaddr.s_addr = groupAddress;
+-  imr.imr_sourceaddr.s_addr = sourceFilterAddr;
+-  imr.imr_interface.s_addr = ReceivingInterfaceAddr;
++  imr.imr_multiaddr = groupAddress;
++  imr.imr_sourceaddr = sourceFilterAddr;
++  imr.imr_interface = ReceivingInterfaceAddr;
+   if (setsockopt(socket, IPPROTO_IP, IP_DROP_SOURCE_MEMBERSHIP,
+ 		 (const char*)&imr, sizeof (struct ip_mreq_source)) < 0) {
+     return False;
+diff -ur live555.orig/Makefile.tail live555/Makefile.tail
+--- live555.orig/Makefile.tail	2012-01-19 16:56:57.038348232 -0500
++++ live555/Makefile.tail	2012-01-19 16:57:10.470348233 -0500
+@@ -14,8 +14,8 @@
+ 	cd $(GROUPSOCK_DIR) ; $(MAKE)
+ 	cd $(USAGE_ENVIRONMENT_DIR) ; $(MAKE)
+ 	cd $(BASIC_USAGE_ENVIRONMENT_DIR) ; $(MAKE)
+-	cd $(TESTPROGS_DIR) ; $(MAKE)
+-	cd $(MEDIA_SERVER_DIR) ; $(MAKE)
++#	cd $(TESTPROGS_DIR) ; $(MAKE)
++#	cd $(MEDIA_SERVER_DIR) ; $(MAKE)
+ 
+ clean:
+ 	cd $(LIVEMEDIA_DIR) ; $(MAKE) clean
diff --git a/contrib/src/live555/rules.mak b/contrib/src/live555/rules.mak
index 9997fc8..4f870a4 100644
--- a/contrib/src/live555/rules.mak
+++ b/contrib/src/live555/rules.mak
@@ -16,6 +16,9 @@ live555: $(LIVE555_FILE) .sum-live555
 	$(UNPACK)
 	chmod -R u+w live
 	mv live $@
+ifdef HAVE_ANDROID
+	patch -p0 < $(SRC)/live555/android.patch
+endif
 	touch $@
 
 LIVE_TARGET = $(error live555 target not defined!)



More information about the vlc-commits mailing list