aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/xulrunner/APKBUILD23
-rw-r--r--main/xulrunner/firefox-musl.patch485
-rw-r--r--main/xulrunner/fix-ipc.patch51
-rw-r--r--main/xulrunner/fix-media.patch36
-rw-r--r--main/xulrunner/fix-toolkit.patch88
-rw-r--r--main/xulrunner/fix-tools.patch91
6 files changed, 158 insertions, 616 deletions
diff --git a/main/xulrunner/APKBUILD b/main/xulrunner/APKBUILD
index 4ad3700bc8..6882f4f9be 100644
--- a/main/xulrunner/APKBUILD
+++ b/main/xulrunner/APKBUILD
@@ -3,7 +3,7 @@
pkgname=xulrunner
pkgver=26.0
_ffoxver=$pkgver
-pkgrel=0
+pkgrel=1
pkgdesc="runtime environment for xul-based applications"
url="http://developer.mozilla.org/en/XULRunner"
arch="all"
@@ -54,6 +54,12 @@ source="ftp://ftp.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgve
stat.patch
moz-libc-filename.patch
+ fix-ipc.patch
+ fix-media.patch
+ fix-netwerk.patch
+ fix-toolkit.patch
+ fix-tools.patch
+
stab.h
"
@@ -126,6 +132,11 @@ d3d1e831185da3a3e9ddf56c33449c70 uclibc-malloc_usable_size.patch
507742325de8687529e4e81e31132ddf getchar.patch
84b101ca9b5f91d3387851e1c42d3908 stat.patch
86b5eb4bb890a45808cc3a46b99cd8a5 moz-libc-filename.patch
+38a9c0d5be155164d50a956ac131d991 fix-ipc.patch
+fe0c52aba8e0b9a889fbcefdc4e5a9a3 fix-media.patch
+41520f6c013807e6af2c377276efb843 fix-netwerk.patch
+8c8692c066a37b3be9756ac844778364 fix-toolkit.patch
+7d5294021091e861c6a830b2a2044d7a fix-tools.patch
4383d038b8d8411ea46f4a109197c19e stab.h"
sha256sums="31c4fb2792df63ae450e350380a5e18cf1c51487011a9da0b6cc4bffb69d9812 firefox-26.0.source.tar.bz2
a5ab8c12da5f266458e7f456205a58ea3bedcce717dae9e2087cf59db9598a64 mozconfig
@@ -135,6 +146,11 @@ a5ab8c12da5f266458e7f456205a58ea3bedcce717dae9e2087cf59db9598a64 mozconfig
d14357bf44f702d94b8d3ed79bdf81f6271370745c1ac8fa83522bd98be4adc4 getchar.patch
bcdfc27fb1561beb797ed8e3d14cb7c88de54a5aed2eb33bf84e331a2b0ec200 stat.patch
889856baa82413afb2f79b7b3e3add626e1ac181efd398e80c434836b793c294 moz-libc-filename.patch
+059a69ff0dbceeaa5bbb1446aa4233bc578a047fcad22c0efa27dc64bbd72980 fix-ipc.patch
+84c4565a7af390c2439c9951e959efcb0840f75cf4459ab4f4637e9c73c48f4a fix-media.patch
+9681d00c44f6b3873eb97d0a7277c04710da956aa4d08c100cf62c24d03d6a5d fix-netwerk.patch
+65809711adcf4c624cee9ce25e9e0a2fe8338217ada82a40049ffd15c2c7e3b7 fix-toolkit.patch
+fabc0e5adca3cbd728c1f7dca2b5fd3b0973eff696656842c3564b96e28c7923 fix-tools.patch
960d82bbfdc88c95f5cb4f2e1c1bf23dae7519b3b7203914d7b3ddbff1ba4c28 stab.h"
sha512sums="c0933eeb39aa1d5d83d4c85885b87e0b817d945eec4fe8fc1b15256008f14308fbf98d5a83217c112e1ad247133f839f6ad74156eed7b159d32d0fce26532713 firefox-26.0.source.tar.bz2
4e3a392276d82a1006351a673b853bd6e7a57f4ae9ec5806edd9e7c8d51edcbaeb32111423088231a7e887490b755ec9701508fe58564fe69dda7eee7b147551 mozconfig
@@ -144,4 +160,9 @@ sha512sums="c0933eeb39aa1d5d83d4c85885b87e0b817d945eec4fe8fc1b15256008f14308fbf9
18f0696bf4d032c83041110b83ae6531b48474a778fc1deade3b06ba2ae1bfcc9891059287bfb78317c2f5ddc88f5b7ce957312acdb63d4902a57e0b40eb6520 getchar.patch
478bb56c8e87c5ce6ccf1dd31cfb48be8e1a817e77e3158f633cb48bd269692061f8728589b9cebfac04d484518c2525d61ba4988abe8ea274fdd419ee02ab34 stat.patch
005d603c4bb90b4ac0d91775cc500416ec218860971a0888316f4d6a92a51f3a67fa30eacbe12c826e589ac0e2ddf3e72eec451382653fd0d557804d4af1e9a6 moz-libc-filename.patch
+3f360d4231355c268fc52e0fedbce5c4f73ad8d60d9424af8641733c0ae181e6226056e605f0d6653b729a9c8e4abe97a9fb2face25938651a7498d5753cea8b fix-ipc.patch
+a568f59db03ad493f5a4aa5702eb28f7c9360284a9862e3bdb798aafe83c4e2547c7445d6748516c28e77209603ff96d562a58cb117d1d1d502b1bd13dc85373 fix-media.patch
+0b96397441a1d42a23e322cdbfcad22ad5b5bc59c7265a7e1a3c4c26381a16a28f31165eb13147ce29174eb5c08ffe885c6df9a1e7b966e0b9c27637830f50ea fix-netwerk.patch
+530c9b49ea418a430614f1107b9448f316178a71ce1a0a7b2e04edade2c88f69379df70430e8886de725b6d1ddb0beb71b86e2117596fdbb8928611d63d2351f fix-toolkit.patch
+419d896ca3f5d35b82aa5aa161b09c14775ee5b11a5a226ce856c2c8176eeaf4b15bcd0473b6109a7bfb09aca44405cecbb3215402f859c1617758082cff6bc6 fix-tools.patch
0b3f1e4b9fdc868e4738b5c81fd6c6128ce8885b260affcb9a65ff9d164d7232626ce1291aaea70132b3e3124f5e13fef4d39326b8e7173e362a823722a85127 stab.h"
diff --git a/main/xulrunner/firefox-musl.patch b/main/xulrunner/firefox-musl.patch
deleted file mode 100644
index 1835d327b2..0000000000
--- a/main/xulrunner/firefox-musl.patch
+++ /dev/null
@@ -1,485 +0,0 @@
-diff -r 06549f98901b ipc/chromium/src/base/debug_util_posix.cc
---- ipc/chromium/src/base/debug_util_posix.cc Fri Aug 02 14:36:52 2013 +0000
-+++ ipc/chromium/src/base/debug_util_posix.cc Fri Aug 02 14:42:20 2013 +0000
-@@ -5,7 +5,7 @@
- #include "build/build_config.h"
- #include "base/debug_util.h"
-
--#define MOZ_HAVE_EXECINFO_H (defined(OS_LINUX) && !defined(ANDROID))
-+#define MOZ_HAVE_EXECINFO_H (defined(OS_LINUX) && defined(__GLIBC__))
-
- #include <errno.h>
- #include <fcntl.h>
-diff -r 06549f98901b ipc/chromium/src/base/file_util.h
---- ipc/chromium/src/base/file_util.h Fri Aug 02 14:36:52 2013 +0000
-+++ ipc/chromium/src/base/file_util.h Fri Aug 02 14:42:20 2013 +0000
-@@ -16,7 +16,11 @@
- #include <sys/stat.h>
- #elif defined(OS_POSIX)
- #include <sys/types.h>
-+#ifndef __GLIBC__
-+#define NO_FTS
-+#else
- #include <fts.h>
-+#endif
- #include <sys/stat.h>
- #endif
-
-@@ -466,7 +470,7 @@
- #if defined(OS_WIN)
- WIN32_FIND_DATA find_data_;
- HANDLE find_handle_;
--#elif defined(ANDROID)
-+#elif defined(NO_FTS)
- void *fts_;
- #elif defined(OS_POSIX)
- FTS* fts_;
-diff -r 06549f98901b ipc/chromium/src/base/file_util_posix.cc
---- ipc/chromium/src/base/file_util_posix.cc Fri Aug 02 14:36:52 2013 +0000
-+++ ipc/chromium/src/base/file_util_posix.cc Fri Aug 02 14:42:20 2013 +0000
-@@ -8,13 +8,16 @@
- #include <errno.h>
- #include <fcntl.h>
- #include <fnmatch.h>
--#ifndef ANDROID
-+#ifndef __GLIBC__
-+#define NO_FTS
-+#endif
-+#ifndef NO_FTS
- #include <fts.h>
- #endif
- #include <libgen.h>
- #include <stdio.h>
- #include <string.h>
--#include <sys/errno.h>
-+#include <errno.h>
- #include <sys/mman.h>
- #define _DARWIN_USE_64_BIT_INODE // Use 64-bit inode data structures
- #include <sys/stat.h>
-@@ -121,7 +124,7 @@
- if (!recursive)
- return (rmdir(path_str) == 0);
-
--#ifdef ANDROID
-+#ifdef NO_FTS
- // XXX Need ftsless impl for bionic
- return false;
- #else
-@@ -194,7 +197,7 @@
- return false;
- }
-
--#ifdef ANDROID
-+#ifdef NO_FTS
- // XXX Need ftsless impl for bionic
- return false;
- #else
-@@ -613,7 +616,7 @@
- }
-
- FileEnumerator::~FileEnumerator() {
--#ifndef ANDROID
-+#ifndef NO_FTS
- if (fts_)
- fts_close(fts_);
- #endif
-@@ -625,7 +628,7 @@
- if (!is_in_find_op_)
- return;
-
--#ifndef ANDROID
-+#ifndef NO_FTS
- memcpy(&(info->stat), fts_ent_->fts_statp, sizeof(info->stat));
- info->filename.assign(fts_ent_->fts_name);
- #endif
-@@ -636,7 +639,7 @@
- // large directories with many files this can be quite deep.
- // TODO(erikkay) - get rid of this recursive pattern
- FilePath FileEnumerator::Next() {
--#ifdef ANDROID
-+#ifdef NO_FTS
- return FilePath();
- #else
- if (!is_in_find_op_) {
-diff -r 06549f98901b ipc/chromium/src/base/time_posix.cc
---- ipc/chromium/src/base/time_posix.cc Fri Aug 02 14:36:52 2013 +0000
-+++ ipc/chromium/src/base/time_posix.cc Fri Aug 02 14:42:20 2013 +0000
-@@ -65,8 +65,10 @@
- timestruct.tm_wday = exploded.day_of_week; // mktime/timegm ignore this
- timestruct.tm_yday = 0; // mktime/timegm ignore this
- timestruct.tm_isdst = -1; // attempt to figure it out
-+#ifdef __GLIBC__
- timestruct.tm_gmtoff = 0; // not a POSIX field, so mktime/timegm ignore
- timestruct.tm_zone = NULL; // not a POSIX field, so mktime/timegm ignore
-+#endif
-
- time_t seconds;
- #ifdef ANDROID
-diff -r 06549f98901b media/libcubeb/src/Makefile.in
---- media/libcubeb/src/Makefile.in Fri Aug 02 14:36:52 2013 +0000
-+++ media/libcubeb/src/Makefile.in Fri Aug 02 14:42:20 2013 +0000
-@@ -53,7 +53,7 @@
- DEFINES += -DUSE_SNDIO
- endif
-
--ifdef MOZ_ALSA
-+ifdef MOZ_ALSA_LIBS
- CSRCS += \
- cubeb_alsa.c \
- $(NULL)
-diff -r 06549f98901b media/libcubeb/src/cubeb_alsa.c
---- media/libcubeb/src/cubeb_alsa.c Fri Aug 02 14:36:52 2013 +0000
-+++ media/libcubeb/src/cubeb_alsa.c Fri Aug 02 14:42:20 2013 +0000
-@@ -6,6 +6,7 @@
- */
- #undef NDEBUG
- #define _BSD_SOURCE
-+#define _POSIX_C_SOURCE 200112L
- #define _XOPEN_SOURCE 500
- #include <pthread.h>
- #include <sys/time.h>
-diff -r 06549f98901b media/mtransport/third_party/nICEr/src/stun/addrs.c
---- media/mtransport/third_party/nICEr/src/stun/addrs.c Fri Aug 02 14:36:52 2013 +0000
-+++ media/mtransport/third_party/nICEr/src/stun/addrs.c Fri Aug 02 14:42:20 2013 +0000
-@@ -63,7 +63,7 @@
- #include <net/if_dl.h>
- #include <net/if_types.h>
- #include <sys/sockio.h>
--#else
-+#elif 0
- #include <linux/if.h>
- #endif
- #include <net/route.h>
-diff -r 06549f98901b media/webrtc/trunk/testing/gtest/src/gtest.cc
---- media/webrtc/trunk/testing/gtest/src/gtest.cc Fri Aug 02 14:36:52 2013 +0000
-+++ media/webrtc/trunk/testing/gtest/src/gtest.cc Fri Aug 02 14:42:20 2013 +0000
-@@ -48,6 +48,8 @@
- #include <sstream>
- #include <vector>
-
-+#include <sys/socket.h>
-+
- #if GTEST_OS_LINUX
-
- // TODO(kenton@google.com): Use autoconf to detect availability of
-diff -r 06549f98901b media/webrtc/trunk/webrtc/system_wrappers/source/cpu_info.cc
---- media/webrtc/trunk/webrtc/system_wrappers/source/cpu_info.cc Fri Aug 02 14:36:52 2013 +0000
-+++ media/webrtc/trunk/webrtc/system_wrappers/source/cpu_info.cc Fri Aug 02 14:42:20 2013 +0000
-@@ -38,7 +38,7 @@
- WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1,
- "Available number of cores:%d", number_of_cores_);
-
--#elif defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_GONK)
-+#elif defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_GONK) && defined(__GLIBC__)
- number_of_cores_ = get_nprocs();
- WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1,
- "Available number of cores:%d", number_of_cores_);
-diff -r 06549f98901b media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc
---- media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc Fri Aug 02 14:36:52 2013 +0000
-+++ media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc Fri Aug 02 14:42:20 2013 +0000
-@@ -264,7 +264,7 @@
-
- // CPU_ZERO and CPU_SET are not available in NDK r7, so disable
- // SetAffinity on Android for now.
--#if defined(__FreeBSD__) || defined(__NetBSD__) || (defined(WEBRTC_LINUX) && (!defined(WEBRTC_ANDROID)) && (!defined(WEBRTC_GONK)))
-+#if defined(__FreeBSD__) || defined(__NetBSD__) || (defined(WEBRTC_LINUX) && (!defined(WEBRTC_ANDROID)) && (!defined(WEBRTC_GONK)) && defined(__GLIBC__))
- bool ThreadPosix::SetAffinity(const int* processor_numbers,
- const unsigned int amount_of_processors) {
- if (!processor_numbers || (amount_of_processors == 0)) {
-diff -r 06549f98901b netwerk/sctp/src/netinet/sctp_bsd_addr.c
---- netwerk/sctp/src/netinet/sctp_bsd_addr.c Fri Aug 02 14:36:52 2013 +0000
-+++ netwerk/sctp/src/netinet/sctp_bsd_addr.c Fri Aug 02 14:42:20 2013 +0000
-@@ -49,11 +49,9 @@
- #include <netinet/sctp_sysctl.h>
- #include <netinet/sctp_indata.h>
- #if !defined(__Userspace_os_Windows)
-+#include <unistd.h>
- #if defined(ANDROID)
--#include <unistd.h>
- #include <ifaddrs-android-ext.h>
--#else
--#include <sys/unistd.h>
- #endif
- #endif
-
-diff -r 06549f98901b netwerk/sctp/src/netinet/sctp_os_userspace.h
---- netwerk/sctp/src/netinet/sctp_os_userspace.h Fri Aug 02 14:36:52 2013 +0000
-+++ netwerk/sctp/src/netinet/sctp_os_userspace.h Fri Aug 02 14:42:20 2013 +0000
-@@ -381,9 +381,8 @@
- };
-
- #else /* !defined(Userspace_os_Windows) */
--#include <sys/cdefs.h> /* needed? added from old __FreeBSD__ */
- #include <sys/socket.h>
--#if defined(__Userspace_os_FreeBSD) || defined(__Userspace_os_OpenBSD) || defined(ANDROID) || defined(__Userspace_os_NetBSD)
-+#if defined(__Userspace_os_FreeBSD) || defined(__Userspace_os_OpenBSD) || defined(ANDROID) || defined(__Userspace_os_NetBSD) || 1
- #include <pthread.h>
- #endif
- typedef pthread_mutex_t userland_mutex_t;
-@@ -408,7 +407,7 @@
- /* #include <sys/param.h> in FreeBSD defines MSIZE */
- /* #include <sys/ktr.h> */
- /* #include <sys/systm.h> */
--#if defined(__Userspace_os_Windows)
-+#if defined(__Userspace_os_Windows) || 1
- #include <user_queue.h>
- #else
- #include <sys/queue.h>
-diff -r 06549f98901b netwerk/sctp/src/netinet/sctp_pcb.c
---- netwerk/sctp/src/netinet/sctp_pcb.c Fri Aug 02 14:36:52 2013 +0000
-+++ netwerk/sctp/src/netinet/sctp_pcb.c Fri Aug 02 14:42:20 2013 +0000
-@@ -30,6 +30,8 @@
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-+#define _BSD_SOURCE /* for IPPORT_RESERVED */
-+
- #ifdef __FreeBSD__
- #include <sys/cdefs.h>
- __FBSDID("$FreeBSD: head/sys/netinet/sctp_pcb.c 246687 2013-02-11 21:02:49Z tuexen $");
-@@ -69,11 +71,10 @@
- #endif
- #if defined(__Userspace__)
- #if !defined(__Userspace_os_Windows)
-+#include <netdb.h>
-+#include <unistd.h>
- #if defined(ANDROID)
--#include <unistd.h>
- #include <ifaddrs-android-ext.h>
--#else
--#include <sys/unistd.h>
- #endif
- #endif
- #include <user_socketvar.h>
-diff -r 06549f98901b netwerk/sctp/src/user_queue.h
---- netwerk/sctp/src/user_queue.h Fri Aug 02 14:36:52 2013 +0000
-+++ netwerk/sctp/src/user_queue.h Fri Aug 02 14:42:20 2013 +0000
-@@ -31,9 +31,6 @@
- #ifndef _USER_QUEUE_H_
- #define _USER_QUEUE_H_
-
--#if !defined (__Userspace_os_Windows)
--#include <sys/cdefs.h>
--#endif
- /*
- * This file defines four types of data structures: singly-linked lists,
- * singly-linked tail queues, lists and tail queues.
-diff -r 06549f98901b toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc
---- toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc Fri Aug 02 14:36:52 2013 +0000
-+++ toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc Fri Aug 02 14:42:20 2013 +0000
-@@ -46,6 +46,9 @@
- #include <sys/stat.h>
- #include <unistd.h>
-
-+// [Gregor] POSIX specifies dirname/basename as in libgen.h
-+#include <libgen.h>
-+
- #include <iostream>
- #include <set>
- #include <string>
-diff -r 06549f98901b toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc
---- toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc Fri Aug 02 14:36:52 2013 +0000
-+++ toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc Fri Aug 02 14:42:20 2013 +0000
-@@ -41,6 +41,10 @@
-
- #include "common/using_std_string.h"
-
-+#ifndef N_UNDF
-+#define N_UNDF 0
-+#endif
-+
- using std::vector;
-
- namespace google_breakpad {
-diff -r 06549f98901b toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h
---- toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h Fri Aug 02 14:36:52 2013 +0000
-+++ toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h Fri Aug 02 14:42:20 2013 +0000
-@@ -53,7 +53,7 @@
- #include <config.h>
- #endif
-
--#ifdef HAVE_A_OUT_H
-+#if 0
- #include <a.out.h>
- #endif
- #ifdef HAVE_MACH_O_NLIST_H
-diff -r 06549f98901b toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h
---- toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h Fri Aug 02 14:36:52 2013 +0000
-+++ toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h Fri Aug 02 14:42:20 2013 +0000
-@@ -2813,7 +2813,7 @@
- LSS_INLINE _syscall6(void*, mmap, void*, s,
- size_t, l, int, p,
- int, f, int, d,
-- __off64_t, o)
-+ off_t, o)
-
- LSS_INLINE _syscall4(int, newfstatat, int, d,
- const char *, p,
-diff -r 06549f98901b toolkit/library/Makefile.in
---- toolkit/library/Makefile.in Fri Aug 02 14:36:52 2013 +0000
-+++ toolkit/library/Makefile.in Fri Aug 02 14:42:20 2013 +0000
-@@ -427,7 +427,7 @@
-
-
- ifdef MOZ_CUBEB
--ifdef MOZ_ALSA
-+ifdef MOZ_ALSA_LIBS
- EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS)
- endif
- ifdef MOZ_PULSEAUDIO
-diff -r 06549f98901b toolkit/mozapps/update/common/updatedefines.h
---- toolkit/mozapps/update/common/updatedefines.h Fri Aug 02 14:36:52 2013 +0000
-+++ toolkit/mozapps/update/common/updatedefines.h Fri Aug 02 14:42:20 2013 +0000
-@@ -106,8 +106,10 @@
- #ifdef SOLARIS
- # include <sys/stat.h>
- #else
-+#if !defined(__linux__) || defined(__GLIBC__)
- # include <fts.h>
- #endif
-+#endif
- # include <dirent.h>
-
- #ifdef XP_MACOSX
-diff -r 06549f98901b toolkit/mozapps/update/updater/updater.cpp
---- toolkit/mozapps/update/updater/updater.cpp Fri Aug 02 14:36:52 2013 +0000
-+++ toolkit/mozapps/update/updater/updater.cpp Fri Aug 02 14:42:20 2013 +0000
-@@ -3369,6 +3369,7 @@
- int add_dir_entries(const NS_tchar *dirpath, ActionList *list)
- {
- int rv = OK;
-+#if !defined(__linux__) || defined(__GLIBC__)
- FTS *ftsdir;
- FTSENT *ftsdirEntry;
- NS_tchar searchpath[MAXPATHLEN];
-@@ -3471,6 +3472,7 @@
- }
-
- fts_close(ftsdir);
-+#endif
-
- return rv;
- }
-diff -r 06549f98901b toolkit/xre/nsSigHandlers.cpp
---- toolkit/xre/nsSigHandlers.cpp Fri Aug 02 14:36:52 2013 +0000
-+++ toolkit/xre/nsSigHandlers.cpp Fri Aug 02 14:42:20 2013 +0000
-@@ -15,6 +15,7 @@
- #include <signal.h>
- #include <stdio.h>
- #include <string.h>
-+#include <sys/types.h>
- #include "prthread.h"
- #include "plstr.h"
- #include "prenv.h"
-@@ -152,7 +153,7 @@
- status->__invalid = status->__denorm = status->__zdiv = status->__ovrfl = status->__undfl =
- status->__precis = status->__stkflt = status->__errsumm = 0;
-
-- __uint32_t *mxcsr = &uc->uc_mcontext->__fs.__fpu_mxcsr;
-+ u_int32_t *mxcsr = &uc->uc_mcontext->__fs.__fpu_mxcsr;
- *mxcsr |= SSE_EXCEPTION_MASK; /* disable all SSE exceptions */
- *mxcsr &= ~SSE_STATUS_FLAGS; /* clear all pending SSE exceptions */
- #endif
-@@ -172,13 +173,13 @@
- *sw &= ~FPU_STATUS_FLAGS;
- #endif
- #if defined(__amd64__)
-- __uint16_t *cw = &uc->uc_mcontext.fpregs->cwd;
-+ u_int16_t *cw = &uc->uc_mcontext.fpregs->cwd;
- *cw |= FPU_EXCEPTION_MASK;
-
-- __uint16_t *sw = &uc->uc_mcontext.fpregs->swd;
-+ u_int16_t *sw = &uc->uc_mcontext.fpregs->swd;
- *sw &= ~FPU_STATUS_FLAGS;
-
-- __uint32_t *mxcsr = &uc->uc_mcontext.fpregs->mxcsr;
-+ u_int32_t *mxcsr = &uc->uc_mcontext.fpregs->mxcsr;
- *mxcsr |= SSE_EXCEPTION_MASK; /* disable all SSE exceptions */
- *mxcsr &= ~SSE_STATUS_FLAGS; /* clear all pending SSE exceptions */
- #endif
-@@ -187,24 +188,24 @@
- ucontext_t *uc = (ucontext_t *)context;
-
- #if defined(__i386)
-- uint32_t *cw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[0];
-+ u_int32_t *cw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[0];
- *cw |= FPU_EXCEPTION_MASK;
-
-- uint32_t *sw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[1];
-+ u_int32_t *sw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[1];
- *sw &= ~FPU_STATUS_FLAGS;
-
- /* address of the instruction that caused the exception */
-- uint32_t *ip = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[3];
-+ u_int32_t *ip = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[3];
- uc->uc_mcontext.gregs[REG_PC] = *ip;
- #endif
- #if defined(__amd64__)
-- uint16_t *cw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.cw;
-+ u_int16_t *cw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.cw;
- *cw |= FPU_EXCEPTION_MASK;
-
-- uint16_t *sw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.sw;
-+ u_int16_t *sw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.sw;
- *sw &= ~FPU_STATUS_FLAGS;
-
-- uint32_t *mxcsr = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.mxcsr;
-+ u_int32_t *mxcsr = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.mxcsr;
- *mxcsr |= SSE_EXCEPTION_MASK; /* disable all SSE exceptions */
- *mxcsr &= ~SSE_STATUS_FLAGS; /* clear all pending SSE exceptions */
- #endif
-diff -r 06549f98901b tools/profiler/platform-linux.cc
---- tools/profiler/platform-linux.cc Fri Aug 02 14:36:52 2013 +0000
-+++ tools/profiler/platform-linux.cc Fri Aug 02 14:42:20 2013 +0000
-@@ -66,7 +66,7 @@
-
- #define SIGNAL_SAVE_PROFILE SIGUSR2
-
--#if defined(__GLIBC__)
-+#if 1
- // glibc doesn't implement gettid(2).
- #include <sys/syscall.h>
- pid_t gettid()
-@@ -181,7 +181,7 @@
- // Convert ms to us and subtract 100 us to compensate delays
- // occuring during signal delivery.
- // TODO measure and confirm this.
-- const useconds_t interval = sampler_->interval_ * 1000 - 100;
-+ const unsigned long interval = sampler_->interval_ * 1000 - 100;
- //int result = usleep(interval);
- usleep(interval);
- }
-diff -r 06549f98901b tools/profiler/platform.h
---- tools/profiler/platform.h Fri Aug 02 14:36:52 2013 +0000
-+++ tools/profiler/platform.h Fri Aug 02 14:42:20 2013 +0000
-@@ -29,6 +29,8 @@
- #ifndef TOOLS_PLATFORM_H_
- #define TOOLS_PLATFORM_H_
-
-+#include <sys/types.h>
-+
- // Uncomment this line to force desktop logging
- //#define SPS_FORCE_LOG
-
-diff -r 06549f98901b tools/profiler/shared-libraries-linux.cc
---- tools/profiler/shared-libraries-linux.cc Fri Aug 02 14:36:52 2013 +0000
-+++ tools/profiler/shared-libraries-linux.cc Fri Aug 02 14:42:20 2013 +0000
-@@ -14,7 +14,7 @@
- #include "platform.h"
- #include "shared-libraries.h"
-
--#ifndef __GLIBC__
-+#if 0
- /* a crapy version of getline, because it's not included in bionic */
- static ssize_t getline(char **lineptr, size_t *n, FILE *stream)
- {
-@@ -35,7 +35,9 @@
- #ifdef ANDROID
- #include "ElfLoader.h" // dl_phdr_info
- #else
-+extern "C" { // [Gregor] musl bug
- #include <link.h> // dl_phdr_info
-+}
- #endif
- #include <features.h>
- #include <dlfcn.h>
diff --git a/main/xulrunner/fix-ipc.patch b/main/xulrunner/fix-ipc.patch
index 98590c9a02..e21d57f40d 100644
--- a/main/xulrunner/fix-ipc.patch
+++ b/main/xulrunner/fix-ipc.patch
@@ -1,4 +1,4 @@
---- mozilla-release/ipc.orig/chromium/src/base/debug_util_posix.cc
+--- mozilla-release.orig/ipc/chromium/src/base/debug_util_posix.cc
+++ mozilla-release/ipc/chromium/src/base/debug_util_posix.cc
@@ -5,7 +5,7 @@
#include "build/build_config.h"
@@ -9,9 +9,9 @@
#include <errno.h>
#include <fcntl.h>
---- mozilla-release/ipc.orig/chromium/src/base/file_util.h
+--- mozilla-release.orig/ipc/chromium/src/base/file_util.h
+++ mozilla-release/ipc/chromium/src/base/file_util.h
-@@ -14,11 +14,16 @@
+@@ -14,10 +14,15 @@
#include <windows.h>
#elif defined(ANDROID)
#include <sys/stat.h>
@@ -24,21 +24,11 @@
+#include <fts.h>
+#else
+#define NO_FTS
- #endif
+#endif
+ #endif
#include <stdio.h>
-
-@@ -466,7 +471,7 @@
- #if defined(OS_WIN)
- WIN32_FIND_DATA find_data_;
- HANDLE find_handle_;
--#elif defined(ANDROID)
-+#elif defined(NO_FTS)
- void *fts_;
- #elif defined(OS_POSIX)
- FTS* fts_;
---- mozilla-release/ipc.orig/chromium/src/base/file_util_posix.cc
+--- mozilla-release.orig/ipc/chromium/src/base/file_util_posix.cc
+++ mozilla-release/ipc/chromium/src/base/file_util_posix.cc
@@ -8,13 +8,13 @@
#include <errno.h>
@@ -56,7 +46,7 @@
#include <sys/mman.h>
#define _DARWIN_USE_64_BIT_INODE // Use 64-bit inode data structures
#include <sys/stat.h>
-@@ -121,7 +121,7 @@
+@@ -67,7 +67,7 @@
if (!recursive)
return (rmdir(path_str) == 0);
@@ -65,7 +55,7 @@
// XXX Need ftsless impl for bionic
return false;
#else
-@@ -194,7 +194,7 @@
+@@ -140,7 +140,7 @@
return false;
}
@@ -74,30 +64,3 @@
// XXX Need ftsless impl for bionic
return false;
#else
-@@ -613,7 +613,7 @@
- }
-
- FileEnumerator::~FileEnumerator() {
--#ifndef ANDROID
-+#ifndef NO_FTS
- if (fts_)
- fts_close(fts_);
- #endif
-@@ -625,7 +625,7 @@
- if (!is_in_find_op_)
- return;
-
--#ifndef ANDROID
-+#ifndef NO_FTS
- memcpy(&(info->stat), fts_ent_->fts_statp, sizeof(info->stat));
- info->filename.assign(fts_ent_->fts_name);
- #endif
-@@ -636,7 +636,7 @@
- // large directories with many files this can be quite deep.
- // TODO(erikkay) - get rid of this recursive pattern
- FilePath FileEnumerator::Next() {
--#ifdef ANDROID
-+#ifdef NO_FTS
- return FilePath();
- #else
- if (!is_in_find_op_) {
diff --git a/main/xulrunner/fix-media.patch b/main/xulrunner/fix-media.patch
index 49010333d2..5912d3cc2c 100644
--- a/main/xulrunner/fix-media.patch
+++ b/main/xulrunner/fix-media.patch
@@ -1,12 +1,30 @@
--- mozilla-release/media.orig/mtransport/third_party/nICEr/src/stun/addrs.c
+++ mozilla-release/media/mtransport/third_party/nICEr/src/stun/addrs.c
-@@ -59,8 +59,8 @@
- #include <net/if_dl.h>
- #include <net/if_types.h>
- #include <sys/sockio.h>
--#else
-+#elif defined(__GLIBC__)
- #include <linux/if.h>
+@@ -53,7 +53,6 @@
+ #undef __unused
+ #include <linux/sysctl.h>
#endif
- #include <net/route.h>
-
+-#include <net/if.h>
+ #ifndef LINUX
+ #if !defined(__OpenBSD__) && !defined(__NetBSD__)
+ #include <net/if_var.h>
+@@ -63,8 +62,8 @@
+ #include <sys/sockio.h>
+ #else
+ #include <linux/sockios.h>
+-#include <linux/if.h>
+ #include <linux/kernel.h>
++#include <linux/if.h>
+ #include <linux/wireless.h>
+ #ifndef ANDROID
+ #include <linux/ethtool.h>
+--- mozilla-release/media.orig/mtransport/third_party/nICEr/src/stun/stun.h
++++ mozilla-release/media/mtransport/third_party/nICEr/src/stun/stun.h
+@@ -39,7 +39,6 @@
+ #else
+ #include <sys/param.h>
+ #include <sys/socket.h>
+-#include <net/if.h>
+ #ifndef LINUX
+ #if !defined(__OpenBSD__) && !defined(__NetBSD__)
+ #include <net/if_var.h>
diff --git a/main/xulrunner/fix-toolkit.patch b/main/xulrunner/fix-toolkit.patch
new file mode 100644
index 0000000000..c572189518
--- /dev/null
+++ b/main/xulrunner/fix-toolkit.patch
@@ -0,0 +1,88 @@
+--- mozilla-release/toolkit.orig/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc
++++ mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc
+@@ -45,6 +45,7 @@
+ #include <sys/mman.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
++#include <libgen.h>
+
+ #include <iostream>
+ #include <set>
+--- mozilla-release/toolkit.orig/crashreporter/google-breakpad/src/common/stabs_reader.cc
++++ mozilla-release/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc
+@@ -41,6 +41,10 @@
+
+ #include "common/using_std_string.h"
+
++#ifndef N_UNDF
++#define N_UNDF 0
++#endif
++
+ using std::vector;
+
+ namespace google_breakpad {
+--- mozilla-release/toolkit.orig/crashreporter/google-breakpad/src/common/stabs_reader.h
++++ mozilla-release/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h
+@@ -53,9 +53,10 @@
+ #include <config.h>
+ #endif
+
+-#ifdef HAVE_A_OUT_H
++#if 0
+ #include <a.out.h>
+ #endif
++
+ #ifdef HAVE_MACH_O_NLIST_H
+ #include <mach-o/nlist.h>
+ #endif
+--- mozilla-release/toolkit.orig/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h
++++ mozilla-release/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h
+@@ -2813,7 +2813,7 @@
+ LSS_INLINE _syscall6(void*, mmap, void*, s,
+ size_t, l, int, p,
+ int, f, int, d,
+- __off64_t, o)
++ off_t, o)
+
+ LSS_INLINE _syscall4(int, newfstatat, int, d,
+ const char *, p,
+--- mozilla-release/toolkit.orig/library/Makefile.in
++++ mozilla-release/toolkit/library/Makefile.in
+@@ -423,7 +423,7 @@
+
+
+ ifdef MOZ_CUBEB
+-ifdef MOZ_ALSA
++ifdef MOZ_ALSA_LIBS
+ EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS)
+ endif
+ ifdef MOZ_PULSEAUDIO
+--- mozilla-release/toolkit.orig/mozapps/update/common/updatedefines.h
++++ mozilla-release/toolkit/mozapps/update/common/updatedefines.h
+@@ -105,7 +105,7 @@
+
+ #ifdef SOLARIS
+ # include <sys/stat.h>
+-#else
++#elif !defined(__linux__) || defined(__GLIBC__)
+ # include <fts.h>
+ #endif
+ # include <dirent.h>
+--- mozilla-release/toolkit.orig/mozapps/update/updater/updater.cpp
++++ mozilla-release/toolkit/mozapps/update/updater/updater.cpp
+@@ -3422,6 +3422,7 @@
+ int add_dir_entries(const NS_tchar *dirpath, ActionList *list)
+ {
+ int rv = OK;
++#if !defined(__linux__) || defined(__GLIBC__)
+ FTS *ftsdir;
+ FTSENT *ftsdirEntry;
+ NS_tchar searchpath[MAXPATHLEN];
+@@ -3524,6 +3525,7 @@
+ }
+
+ fts_close(ftsdir);
++#endif
+
+ return rv;
+ }
diff --git a/main/xulrunner/fix-tools.patch b/main/xulrunner/fix-tools.patch
index 8a370b4abd..583ceec3e2 100644
--- a/main/xulrunner/fix-tools.patch
+++ b/main/xulrunner/fix-tools.patch
@@ -1,4 +1,4 @@
---- mozilla-release/tools.orig/profiler/local_debug_info_symbolizer.cc
+--- mozilla-release.orig/tools/profiler/local_debug_info_symbolizer.cc
+++ mozilla-release/tools/profiler/local_debug_info_symbolizer.cc
@@ -3,6 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -8,9 +8,9 @@
#include "PlatformMacros.h"
#include "nsAutoPtr.h"
---- mozilla-release/tools.orig/profiler/platform-linux.cc
+--- mozilla-release.orig/tools/profiler/platform-linux.cc
+++ mozilla-release/tools/profiler/platform-linux.cc
-@@ -73,7 +73,7 @@
+@@ -84,7 +84,7 @@
#define SIGNAL_SAVE_PROFILE SIGUSR2
@@ -19,16 +19,7 @@
// glibc doesn't implement gettid(2).
#include <sys/syscall.h>
pid_t gettid()
-@@ -278,7 +278,7 @@
- // Convert ms to us and subtract 100 us to compensate delays
- // occuring during signal delivery.
- // TODO measure and confirm this.
-- const useconds_t interval =
-+ const unsigned long interval =
- SamplerRegistry::sampler->interval() * 1000 - 100;
- //int result = usleep(interval);
- usleep(interval);
---- mozilla-release/tools.orig/profiler/platform.h
+--- mozilla-release.orig/tools/profiler/platform.h
+++ mozilla-release/tools/profiler/platform.h
@@ -29,6 +29,8 @@
#ifndef TOOLS_PLATFORM_H_
@@ -39,68 +30,14 @@
#ifdef ANDROID
#include <android/log.h>
#else
---- mozilla-release/toolkit.orig/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc
-+++ mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc
-@@ -45,6 +45,7 @@
- #include <sys/mman.h>
- #include <sys/stat.h>
- #include <unistd.h>
-+#include <libgen.h>
-
- #include <iostream>
- #include <set>
---- mozilla-release/toolkit.orig/crashreporter/google-breakpad/src/common/stabs_reader.cc
-+++ mozilla-release/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc
-@@ -41,6 +41,10 @@
-
- #include "common/using_std_string.h"
-
-+#ifndef N_UNDF
-+#define N_UNDF 0
-+#endif
-+
- using std::vector;
-
- namespace google_breakpad {
---- mozilla-release/toolkit.orig/crashreporter/google-breakpad/src/common/stabs_reader.h
-+++ mozilla-release/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h
-@@ -53,9 +53,6 @@
- #include <config.h>
- #endif
-
--#ifdef HAVE_A_OUT_H
--#include <a.out.h>
--#endif
- #ifdef HAVE_MACH_O_NLIST_H
- #include <mach-o/nlist.h>
- #endif
---- mozilla-release/toolkit.orig/mozapps/update/common/updatedefines.h
-+++ mozilla-release/toolkit/mozapps/update/common/updatedefines.h
-@@ -105,7 +105,7 @@
-
- #ifdef SOLARIS
- # include <sys/stat.h>
--#else
-+#elif defined(__GLIBC__)
- # include <fts.h>
- #endif
- # include <dirent.h>
---- mozilla-release/toolkit.orig/mozapps/update/updater/updater.cpp
-+++ mozilla-release/toolkit/mozapps/update/updater/updater.cpp
-@@ -43,6 +43,7 @@
- #include <stdarg.h>
-
- #include <sys/types.h>
-+#include <sys/param.h>
- #include <sys/stat.h>
- #include <fcntl.h>
- #include <limits.h>
-@@ -3328,7 +3329,7 @@
- return rv;
- }
-
--#elif defined(SOLARIS)
-+#elif defined(SOLARIS) || !defined(__GLIBC__)
- int add_dir_entries(const NS_tchar *dirpath, ActionList *list)
+--- mozilla-release/tools.orig/profiler/shared-libraries-linux.cc
++++ mozilla-release/tools/profiler/shared-libraries-linux.cc
+@@ -14,7 +14,7 @@
+ #include "platform.h"
+ #include "shared-libraries.h"
+
+-#if !defined(__GLIBC__) && ANDROID_VERSION < 18
++#if defined(ANDROID) && ANDROID_VERSION < 18
+ /* a crapy version of getline, because it's not included in old bionics */
+ static ssize_t getline(char **lineptr, size_t *n, FILE *stream)
{
- int rv = OK;