summaryrefslogtreecommitdiff
path: root/package/firefox
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2013-11-29 16:06:00 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2013-11-29 16:06:00 +0100
commit8e8512391c668fc7074f812f15eabe8f176fb01e (patch)
treef9f0862dd6eb962fe3fc4803180b431843f6c5be /package/firefox
parentc491653a1f9574a42965025805d472c3d145f699 (diff)
parentae3d4616ed9c19a29d656193254657f93d612fa2 (diff)
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'package/firefox')
-rw-r--r--package/firefox/Makefile14
-rw-r--r--package/firefox/patches/patch-extensions_spellcheck_hunspell_src_hunspell_alloc_hooks_h11
-rw-r--r--package/firefox/patches/patch-ipc_chromium_src_base_debug_util_posix_cc4
-rw-r--r--package/firefox/patches/patch-ipc_chromium_src_base_file_util_h23
-rw-r--r--package/firefox/patches/patch-ipc_chromium_src_base_file_util_posix_cc75
-rw-r--r--package/firefox/patches/patch-js_src_assembler_wtf_Platform_h12
-rw-r--r--package/firefox/patches/patch-js_src_yarr_BumpPointerAllocator_h11
-rw-r--r--package/firefox/patches/patch-media_libcubeb_src_cubeb_alsa_c10
-rw-r--r--package/firefox/patches/patch-media_mtransport_third_party_nICEr_src_stun_addrs_c11
-rw-r--r--package/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio_device_audio_device_impl_cc11
-rw-r--r--package/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio_device_linux_audio_device_alsa_linux_cc11
-rw-r--r--package/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio_device_linux_audio_mixer_manager_alsa_linux_cc11
-rw-r--r--package/firefox/patches/patch-netwerk_sctp_src_netinet_sctp_bsd_addr_c15
-rw-r--r--package/firefox/patches/patch-netwerk_sctp_src_netinet_sctp_os_userspace_h22
-rw-r--r--package/firefox/patches/patch-netwerk_sctp_src_netinet_sctp_pcb_c25
-rw-r--r--package/firefox/patches/patch-netwerk_sctp_src_user_queue_h12
-rw-r--r--package/firefox/patches/patch-toolkit_crashreporter_google-breakpad_src_common_linux_dump_symbols_cc11
-rw-r--r--package/firefox/patches/patch-toolkit_crashreporter_google-breakpad_src_common_stabs_reader_cc15
-rw-r--r--package/firefox/patches/patch-toolkit_crashreporter_google-breakpad_src_common_stabs_reader_h11
-rw-r--r--package/firefox/patches/patch-tools_profiler_UnwinderThread2_cpp10
-rw-r--r--package/firefox/patches/patch-tools_profiler_local_debug_info_symbolizer_cc10
-rw-r--r--package/firefox/patches/patch-tools_profiler_platform-linux_cc18
-rw-r--r--package/firefox/patches/patch-tools_profiler_shared-libraries-linux_cc11
-rw-r--r--package/firefox/patches/patch-xpcom_ds_nsMathUtils_h14
24 files changed, 365 insertions, 13 deletions
diff --git a/package/firefox/Makefile b/package/firefox/Makefile
index 2e72e0073..69df75db1 100644
--- a/package/firefox/Makefile
+++ b/package/firefox/Makefile
@@ -15,15 +15,16 @@ PKG_DEPENDS+= libxdamage libxfixes libidl libsqlite libxcomposite gdk-pixbuf li
PKG_DEPENDS+= harfbuzz mesalib libvpx libbz2 ca-certificates libevent
PKG_BUILDDEP:= alsa-lib glib gtk+ libIDL libX11 MesaLib libtiff gdk-pixbuf
PKG_BUILDDEP+= nspr nss libjpeg-turbo libXt fontconfig sqlite atk libpng hicolor-icon-theme
-PKG_BUILDDEP+= libvpx pango gettext-tiny bzip2 libevent
+PKG_BUILDDEP+= libvpx pango gettext-tiny bzip2 libevent python2-host yasm-host
+PKG_BUILDDEP+= zip-host
PKG_URL:= http://www.mozilla.org/
PKG_SITES:= http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${PKG_VERSION}/source/
PKG_NOPARALLEL:= 1
PKG_NEED_CXX:= 1
-PKG_ARCH_DEPENDS:= x86 x86_64 native mips
+PKG_ARCH_DEPENDS:= arm x86 x86_64 native mips
PKG_HOST_DEPENDS:= !netbsd !freebsd !openbsd !cygwin
-PKG_SYSTEM_DEPENDS:= tarox-pc ibm-x40 lemote-yeelong qemu-i686 qemu-x86_64 qemu-mips64el
+PKG_SYSTEM_DEPENDS:= tarox-pc ibm-x40 lemote-yeelong qemu-i686 qemu-x86_64 qemu-mips64el raspberry-pi
DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.source.tar.bz2
WRKDIST= ${WRKDIR}/mozilla-release
@@ -46,8 +47,6 @@ CONFIGURE_ENV+= CROSS_COMPILE=1 \
HOST_LDFLAGS="${LDLAGS_FOR_BUILD}" \
HOST_CXX="${CXX_FOR_BUILD}" \
HOST_CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \
- BUILD_LIBIDL_CONFIG="${BUILD_LIBIDL_CONFIG}" \
- PKG_HOSTLIB_DIR="${PKG_HOSTLIB_DIR}" \
HOST_RANLIB="ranlib" HOST_AR="ar" \
CPPFLAGS="-I${STAGING_TARGET_DIR}/usr/include/freetype2" \
ac_cv_sqlite_secure_delete=yes \
@@ -104,7 +103,10 @@ CONFIGURE_ARGS+= --enable-application=browser \
--disable-safe-browsing \
--disable-elf-hack
-TARGET_LDFLAGS+= -L$(STAGING_DIR)/usr/lib64 -L$(STAGING_DIR)/usr/lib32
+ifeq ($(ADK_TARGET_SYSTEM_LEMOTE_YEELONG),y)
+TARGET_CFLAGS:= $(subst Os,g3,$(TARGET_CFLAGS))
+endif
+
XAKE_FLAGS+= OS_RELEASE="2.6" HOST_CC=$(CC_FOR_BUILD) HOST_LDFLAGS=$(LDFLAGS_FOR_BUILD)
XAKE_FLAGS+= ARCHFLAG="${TARGET_CFLAGS} ${TARGET_CPPFLAGS} ${TARGET_LDFLAGS} -lnss3 -lnssutil3 -lsmime3 -lssl3 -fPIC"
diff --git a/package/firefox/patches/patch-extensions_spellcheck_hunspell_src_hunspell_alloc_hooks_h b/package/firefox/patches/patch-extensions_spellcheck_hunspell_src_hunspell_alloc_hooks_h
new file mode 100644
index 000000000..5b361b846
--- /dev/null
+++ b/package/firefox/patches/patch-extensions_spellcheck_hunspell_src_hunspell_alloc_hooks_h
@@ -0,0 +1,11 @@
+--- mozilla-release.orig/extensions/spellcheck/hunspell/src/hunspell_alloc_hooks.h 2013-09-11 01:15:00.000000000 +0200
++++ mozilla-release/extensions/spellcheck/hunspell/src/hunspell_alloc_hooks.h 2013-10-24 11:28:30.000000000 +0200
+@@ -33,6 +33,8 @@
+
+ #ifndef alloc_hooks_h__
+ #define alloc_hooks_h__
++/* prevent free/calloc from sched.h to be included */
++#undef _GNU_SOURCE
+
+ /**
+ * This file is force-included in hunspell code. Its purpose is to add memory
diff --git a/package/firefox/patches/patch-ipc_chromium_src_base_debug_util_posix_cc b/package/firefox/patches/patch-ipc_chromium_src_base_debug_util_posix_cc
index 53abb7933..8537bed9a 100644
--- a/package/firefox/patches/patch-ipc_chromium_src_base_debug_util_posix_cc
+++ b/package/firefox/patches/patch-ipc_chromium_src_base_debug_util_posix_cc
@@ -1,5 +1,5 @@
--- mozilla-release.orig/ipc/chromium/src/base/debug_util_posix.cc 2013-09-11 01:15:04.000000000 +0200
-+++ mozilla-release/ipc/chromium/src/base/debug_util_posix.cc 2013-10-14 18:04:28.000000000 +0200
++++ mozilla-release/ipc/chromium/src/base/debug_util_posix.cc 2013-10-23 16:28:38.000000000 +0200
@@ -5,7 +5,9 @@
#include "build/build_config.h"
#include "base/debug_util.h"
@@ -7,7 +7,7 @@
-#define MOZ_HAVE_EXECINFO_H (defined(OS_LINUX) && !defined(ANDROID))
+#include <features.h>
+
-+#define MOZ_HAVE_EXECINFO_H (defined(OS_LINUX) && !defined(ANDROID) && !defined(__UCLIBC__))
++#define MOZ_HAVE_EXECINFO_H (defined(OS_LINUX) && !defined(ANDROID) && !defined(__UCLIBC__)) && defined(__GLIBC__)
#include <errno.h>
#include <fcntl.h>
diff --git a/package/firefox/patches/patch-ipc_chromium_src_base_file_util_h b/package/firefox/patches/patch-ipc_chromium_src_base_file_util_h
new file mode 100644
index 000000000..137efacd8
--- /dev/null
+++ b/package/firefox/patches/patch-ipc_chromium_src_base_file_util_h
@@ -0,0 +1,23 @@
+--- mozilla-release.orig/ipc/chromium/src/base/file_util.h 2013-09-11 01:15:04.000000000 +0200
++++ mozilla-release/ipc/chromium/src/base/file_util.h 2013-10-23 16:28:38.000000000 +0200
+@@ -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 @@ class FileEnumerator {
+ #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 --git a/package/firefox/patches/patch-ipc_chromium_src_base_file_util_posix_cc b/package/firefox/patches/patch-ipc_chromium_src_base_file_util_posix_cc
new file mode 100644
index 000000000..6721e44f8
--- /dev/null
+++ b/package/firefox/patches/patch-ipc_chromium_src_base_file_util_posix_cc
@@ -0,0 +1,75 @@
+--- mozilla-release.orig/ipc/chromium/src/base/file_util_posix.cc 2013-09-11 01:15:04.000000000 +0200
++++ mozilla-release/ipc/chromium/src/base/file_util_posix.cc 2013-10-23 16:28:38.000000000 +0200
+@@ -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 @@ bool Delete(const FilePath& path, bool r
+ 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 @@ bool CopyDirectory(const FilePath& from_
+ return false;
+ }
+
+-#ifdef ANDROID
++#ifdef NO_FTS
+ // XXX Need ftsless impl for bionic
+ return false;
+ #else
+@@ -415,7 +418,7 @@ bool CreateNewTempDirectory(const FilePa
+ return false;
+ tmpdir = tmpdir.Append(kTempFileName);
+ std::string tmpdir_string = tmpdir.value();
+-#ifdef ANDROID
++#ifdef NO_FTS
+ char* dtemp = NULL;
+ #else
+ // this should be OK since mkdtemp just replaces characters in place
+@@ -613,7 +616,7 @@ FileEnumerator::FileEnumerator(const Fil
+ }
+
+ FileEnumerator::~FileEnumerator() {
+-#ifndef ANDROID
++#ifndef NO_FTS
+ if (fts_)
+ fts_close(fts_);
+ #endif
+@@ -625,7 +628,7 @@ void FileEnumerator::GetFindInfo(FindInf
+ 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 @@ void FileEnumerator::GetFindInfo(FindInf
+ // 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/package/firefox/patches/patch-js_src_assembler_wtf_Platform_h b/package/firefox/patches/patch-js_src_assembler_wtf_Platform_h
new file mode 100644
index 000000000..68a7adf0a
--- /dev/null
+++ b/package/firefox/patches/patch-js_src_assembler_wtf_Platform_h
@@ -0,0 +1,12 @@
+--- mozilla-release.orig/js/src/assembler/wtf/Platform.h 2013-09-11 01:15:04.000000000 +0200
++++ mozilla-release/js/src/assembler/wtf/Platform.h 2013-10-28 12:43:50.000000000 +0100
+@@ -139,8 +139,7 @@
+
+ /* WTF_CPU_MIPS - MIPS 32-bit */
+ /* Note: Only O32 ABI is tested, so we enable it for O32 ABI for now. */
+-#if (defined(mips) || defined(__mips__) || defined(MIPS) || defined(_MIPS_)) \
+- && defined(_ABIO32)
++#if (defined(mips) || defined(__mips__) || defined(MIPS) || defined(_MIPS_))
+ #define WTF_CPU_MIPS 1
+ #if defined(__MIPSEB__)
+ #define WTF_CPU_BIG_ENDIAN 1
diff --git a/package/firefox/patches/patch-js_src_yarr_BumpPointerAllocator_h b/package/firefox/patches/patch-js_src_yarr_BumpPointerAllocator_h
new file mode 100644
index 000000000..1697dfddd
--- /dev/null
+++ b/package/firefox/patches/patch-js_src_yarr_BumpPointerAllocator_h
@@ -0,0 +1,11 @@
+--- mozilla-release.orig/js/src/yarr/BumpPointerAllocator.h 2013-09-11 01:15:09.000000000 +0200
++++ mozilla-release/js/src/yarr/BumpPointerAllocator.h 2013-10-28 12:44:10.000000000 +0100
+@@ -38,6 +38,8 @@ namespace WTF {
+ #define MINIMUM_BUMP_POOL_SIZE 0x2000
+ #elif WTF_CPU_IA64
+ #define MINIMUM_BUMP_POOL_SIZE 0x4000
++#elif WTF_CPU_MIPS
++#define MINIMUM_BUMP_POOL_SIZE 0x4000
+ #else
+ #define MINIMUM_BUMP_POOL_SIZE 0x1000
+ #endif
diff --git a/package/firefox/patches/patch-media_libcubeb_src_cubeb_alsa_c b/package/firefox/patches/patch-media_libcubeb_src_cubeb_alsa_c
new file mode 100644
index 000000000..f681a127a
--- /dev/null
+++ b/package/firefox/patches/patch-media_libcubeb_src_cubeb_alsa_c
@@ -0,0 +1,10 @@
+--- mozilla-release.orig/media/libcubeb/src/cubeb_alsa.c 2013-09-11 01:15:15.000000000 +0200
++++ mozilla-release/media/libcubeb/src/cubeb_alsa.c 2013-10-23 16:28:38.000000000 +0200
+@@ -5,6 +5,7 @@
+ * accompanying file LICENSE for details.
+ */
+ #undef NDEBUG
++#define _POSIX_SOURCE
+ #define _BSD_SOURCE
+ #define _XOPEN_SOURCE 500
+ #include <pthread.h>
diff --git a/package/firefox/patches/patch-media_mtransport_third_party_nICEr_src_stun_addrs_c b/package/firefox/patches/patch-media_mtransport_third_party_nICEr_src_stun_addrs_c
new file mode 100644
index 000000000..f422715dd
--- /dev/null
+++ b/package/firefox/patches/patch-media_mtransport_third_party_nICEr_src_stun_addrs_c
@@ -0,0 +1,11 @@
+--- mozilla-release.orig/media/mtransport/third_party/nICEr/src/stun/addrs.c 2013-09-11 01:15:16.000000000 +0200
++++ mozilla-release/media/mtransport/third_party/nICEr/src/stun/addrs.c 2013-10-23 16:28:38.000000000 +0200
+@@ -59,7 +59,7 @@ static char *RCSSTRING __UNUSED__="$Id:
+ #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 --git a/package/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio_device_audio_device_impl_cc b/package/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio_device_audio_device_impl_cc
new file mode 100644
index 000000000..0ef4e5714
--- /dev/null
+++ b/package/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio_device_audio_device_impl_cc
@@ -0,0 +1,11 @@
+--- mozilla-release.orig/media/webrtc/trunk/webrtc/modules/audio_device/audio_device_impl.cc 2013-09-11 01:15:17.000000000 +0200
++++ mozilla-release/media/webrtc/trunk/webrtc/modules/audio_device/audio_device_impl.cc 2013-10-23 16:28:38.000000000 +0200
+@@ -8,6 +8,8 @@
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
++#define _POSIX_SOURCE
++
+ #include "audio_device_impl.h"
+ #include "audio_device_config.h"
+ #include "common_audio/signal_processing/include/signal_processing_library.h"
diff --git a/package/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio_device_linux_audio_device_alsa_linux_cc b/package/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio_device_linux_audio_device_alsa_linux_cc
new file mode 100644
index 000000000..a5fd50511
--- /dev/null
+++ b/package/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio_device_linux_audio_device_alsa_linux_cc
@@ -0,0 +1,11 @@
+--- mozilla-release.orig/media/webrtc/trunk/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc 2013-09-11 01:15:17.000000000 +0200
++++ mozilla-release/media/webrtc/trunk/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc 2013-10-23 16:28:38.000000000 +0200
+@@ -8,6 +8,8 @@
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
++#define _POSIX_SOURCE
++
+ #include <cassert>
+
+ #include "audio_device_utility.h"
diff --git a/package/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio_device_linux_audio_mixer_manager_alsa_linux_cc b/package/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio_device_linux_audio_mixer_manager_alsa_linux_cc
new file mode 100644
index 000000000..2544d6c08
--- /dev/null
+++ b/package/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio_device_linux_audio_mixer_manager_alsa_linux_cc
@@ -0,0 +1,11 @@
+--- mozilla-release.orig/media/webrtc/trunk/webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.cc 2013-09-11 01:15:17.000000000 +0200
++++ mozilla-release/media/webrtc/trunk/webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.cc 2013-10-23 16:28:38.000000000 +0200
+@@ -8,6 +8,8 @@
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
++#define _POSIX_SOURCE
++
+ #include <cassert>
+
+ #include "audio_mixer_manager_alsa_linux.h"
diff --git a/package/firefox/patches/patch-netwerk_sctp_src_netinet_sctp_bsd_addr_c b/package/firefox/patches/patch-netwerk_sctp_src_netinet_sctp_bsd_addr_c
new file mode 100644
index 000000000..b64787d88
--- /dev/null
+++ b/package/firefox/patches/patch-netwerk_sctp_src_netinet_sctp_bsd_addr_c
@@ -0,0 +1,15 @@
+--- mozilla-release.orig/netwerk/sctp/src/netinet/sctp_bsd_addr.c 2013-09-11 01:15:20.000000000 +0200
++++ mozilla-release/netwerk/sctp/src/netinet/sctp_bsd_addr.c 2013-10-23 16:28:38.000000000 +0200
+@@ -49,11 +49,10 @@ __FBSDID("$FreeBSD: head/sys/netinet/sct
+ #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 --git a/package/firefox/patches/patch-netwerk_sctp_src_netinet_sctp_os_userspace_h b/package/firefox/patches/patch-netwerk_sctp_src_netinet_sctp_os_userspace_h
new file mode 100644
index 000000000..c3965834f
--- /dev/null
+++ b/package/firefox/patches/patch-netwerk_sctp_src_netinet_sctp_os_userspace_h
@@ -0,0 +1,22 @@
+--- mozilla-release.orig/netwerk/sctp/src/netinet/sctp_os_userspace.h 2013-09-11 01:15:20.000000000 +0200
++++ mozilla-release/netwerk/sctp/src/netinet/sctp_os_userspace.h 2013-10-23 16:28:38.000000000 +0200
+@@ -381,9 +381,8 @@ struct udphdr {
+ };
+
+ #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)
++#if defined(__Userspace_os_FreeBSD) || defined(__Userspace_os_OpenBSD) || defined(ANDROID) || 1
+ #include <pthread.h>
+ #endif
+ typedef pthread_mutex_t userland_mutex_t;
+@@ -406,7 +405,7 @@ struct sx {int dummy;};
+ /* #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 --git a/package/firefox/patches/patch-netwerk_sctp_src_netinet_sctp_pcb_c b/package/firefox/patches/patch-netwerk_sctp_src_netinet_sctp_pcb_c
new file mode 100644
index 000000000..bee5b1c64
--- /dev/null
+++ b/package/firefox/patches/patch-netwerk_sctp_src_netinet_sctp_pcb_c
@@ -0,0 +1,25 @@
+--- mozilla-release.orig/netwerk/sctp/src/netinet/sctp_pcb.c 2013-09-11 01:15:20.000000000 +0200
++++ mozilla-release/netwerk/sctp/src/netinet/sctp_pcb.c 2013-10-23 16:28:38.000000000 +0200
+@@ -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 @@ __FBSDID("$FreeBSD: head/sys/netinet/sct
+ #endif
+ #if defined(__Userspace__)
+ #if !defined(__Userspace_os_Windows)
+-#if defined(ANDROID)
++#include <netdb.h>
+ #include <unistd.h>
++#if defined(ANDROID)
+ #include <ifaddrs-android-ext.h>
+-#else
+-#include <sys/unistd.h>
+ #endif
+ #endif
+ #include <user_socketvar.h>
diff --git a/package/firefox/patches/patch-netwerk_sctp_src_user_queue_h b/package/firefox/patches/patch-netwerk_sctp_src_user_queue_h
new file mode 100644
index 000000000..0a5f30d28
--- /dev/null
+++ b/package/firefox/patches/patch-netwerk_sctp_src_user_queue_h
@@ -0,0 +1,12 @@
+--- mozilla-release.orig/netwerk/sctp/src/user_queue.h 2013-09-11 01:15:20.000000000 +0200
++++ mozilla-release/netwerk/sctp/src/user_queue.h 2013-10-23 16:28:38.000000000 +0200
+@@ -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 --git a/package/firefox/patches/patch-toolkit_crashreporter_google-breakpad_src_common_linux_dump_symbols_cc b/package/firefox/patches/patch-toolkit_crashreporter_google-breakpad_src_common_linux_dump_symbols_cc
new file mode 100644
index 000000000..3cc0045eb
--- /dev/null
+++ b/package/firefox/patches/patch-toolkit_crashreporter_google-breakpad_src_common_linux_dump_symbols_cc
@@ -0,0 +1,11 @@
+--- mozilla-release.orig/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc 2013-09-11 01:15:25.000000000 +0200
++++ mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc 2013-10-24 12:01:36.000000000 +0200
+@@ -46,6 +46,8 @@
+ #include <sys/stat.h>
+ #include <unistd.h>
+
++#include <libgen.h>
++
+ #include <iostream>
+ #include <set>
+ #include <string>
diff --git a/package/firefox/patches/patch-toolkit_crashreporter_google-breakpad_src_common_stabs_reader_cc b/package/firefox/patches/patch-toolkit_crashreporter_google-breakpad_src_common_stabs_reader_cc
index 2b27e8c72..e8f7afc99 100644
--- a/package/firefox/patches/patch-toolkit_crashreporter_google-breakpad_src_common_stabs_reader_cc
+++ b/package/firefox/patches/patch-toolkit_crashreporter_google-breakpad_src_common_stabs_reader_cc
@@ -1,6 +1,6 @@
--- mozilla-release.orig/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc 2013-09-11 01:15:25.000000000 +0200
-+++ mozilla-release/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc 2013-10-17 10:55:17.000000000 +0200
-@@ -34,7 +34,20 @@
++++ mozilla-release/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc 2013-10-24 12:08:16.000000000 +0200
+@@ -34,13 +34,31 @@
#include "common/stabs_reader.h"
#include <assert.h>
@@ -21,3 +21,14 @@
#include <string.h>
#include <string>
+
+ #include "common/using_std_string.h"
+
++#ifndef N_UNDF
++#define N_UNDF 0
++#endif
++
++
+ using std::vector;
+
+ namespace google_breakpad {
diff --git a/package/firefox/patches/patch-toolkit_crashreporter_google-breakpad_src_common_stabs_reader_h b/package/firefox/patches/patch-toolkit_crashreporter_google-breakpad_src_common_stabs_reader_h
new file mode 100644
index 000000000..5130adea9
--- /dev/null
+++ b/package/firefox/patches/patch-toolkit_crashreporter_google-breakpad_src_common_stabs_reader_h
@@ -0,0 +1,11 @@
+--- mozilla-release.orig/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h 2013-09-11 01:15:25.000000000 +0200
++++ mozilla-release/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h 2013-10-24 11:58:13.000000000 +0200
+@@ -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 --git a/package/firefox/patches/patch-tools_profiler_UnwinderThread2_cpp b/package/firefox/patches/patch-tools_profiler_UnwinderThread2_cpp
new file mode 100644
index 000000000..75c073d55
--- /dev/null
+++ b/package/firefox/patches/patch-tools_profiler_UnwinderThread2_cpp
@@ -0,0 +1,10 @@
+--- mozilla-release.orig/tools/profiler/UnwinderThread2.cpp 2013-09-11 01:15:26.000000000 +0200
++++ mozilla-release/tools/profiler/UnwinderThread2.cpp 2013-10-23 16:28:38.000000000 +0200
+@@ -3,6 +3,7 @@
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
++#include <sys/types.h>
+ #include <stdio.h>
+ #include <signal.h>
+ #include <string.h>
diff --git a/package/firefox/patches/patch-tools_profiler_local_debug_info_symbolizer_cc b/package/firefox/patches/patch-tools_profiler_local_debug_info_symbolizer_cc
new file mode 100644
index 000000000..12d413718
--- /dev/null
+++ b/package/firefox/patches/patch-tools_profiler_local_debug_info_symbolizer_cc
@@ -0,0 +1,10 @@
+--- mozilla-release.orig/tools/profiler/local_debug_info_symbolizer.cc 2013-09-11 01:15:26.000000000 +0200
++++ mozilla-release/tools/profiler/local_debug_info_symbolizer.cc 2013-10-23 16:28:38.000000000 +0200
+@@ -3,6 +3,7 @@
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
++#include <sys/types.h>
+ #include "PlatformMacros.h"
+ #include "nsAutoPtr.h"
+
diff --git a/package/firefox/patches/patch-tools_profiler_platform-linux_cc b/package/firefox/patches/patch-tools_profiler_platform-linux_cc
index 10287f11c..7e9a44eba 100644
--- a/package/firefox/patches/patch-tools_profiler_platform-linux_cc
+++ b/package/firefox/patches/patch-tools_profiler_platform-linux_cc
@@ -1,5 +1,5 @@
--- mozilla-release.orig/tools/profiler/platform-linux.cc 2013-09-11 01:15:26.000000000 +0200
-+++ mozilla-release/tools/profiler/platform-linux.cc 2013-10-16 10:09:54.000000000 +0200
++++ mozilla-release/tools/profiler/platform-linux.cc 2013-10-23 16:28:38.000000000 +0200
@@ -53,7 +53,7 @@
#include <sys/stat.h> // open
#include <fcntl.h> // open
@@ -9,3 +9,19 @@
#include <execinfo.h> // backtrace, backtrace_symbols
#endif // def __GLIBC__
#include <strings.h> // index
+@@ -73,14 +73,12 @@
+
+ #define SIGNAL_SAVE_PROFILE SIGUSR2
+
+-#if defined(__GLIBC__)
+-// glibc doesn't implement gettid(2).
++// glibc/musl doesn't implement gettid(2).
+ #include <sys/syscall.h>
+ pid_t gettid()
+ {
+ return (pid_t) syscall(SYS_gettid);
+ }
+-#endif
+
+ #if !defined(ANDROID)
+ // Keep track of when any of our threads calls fork(), so we can
diff --git a/package/firefox/patches/patch-tools_profiler_shared-libraries-linux_cc b/package/firefox/patches/patch-tools_profiler_shared-libraries-linux_cc
new file mode 100644
index 000000000..8ffa06228
--- /dev/null
+++ b/package/firefox/patches/patch-tools_profiler_shared-libraries-linux_cc
@@ -0,0 +1,11 @@
+--- mozilla-release.orig/tools/profiler/shared-libraries-linux.cc 2013-09-11 01:15:26.000000000 +0200
++++ mozilla-release/tools/profiler/shared-libraries-linux.cc 2013-10-23 16:28:38.000000000 +0200
+@@ -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)
+ {
diff --git a/package/firefox/patches/patch-xpcom_ds_nsMathUtils_h b/package/firefox/patches/patch-xpcom_ds_nsMathUtils_h
index 5a1a81c06..b275a14ec 100644
--- a/package/firefox/patches/patch-xpcom_ds_nsMathUtils_h
+++ b/package/firefox/patches/patch-xpcom_ds_nsMathUtils_h
@@ -1,6 +1,6 @@
--- mozilla-release.orig/xpcom/ds/nsMathUtils.h 2013-09-11 01:15:27.000000000 +0200
-+++ mozilla-release/xpcom/ds/nsMathUtils.h 2013-10-14 14:05:43.000000000 +0200
-@@ -98,7 +98,7 @@ inline NS_HIDDEN_(bool) NS_finite(double
++++ mozilla-release/xpcom/ds/nsMathUtils.h 2013-10-23 16:28:38.000000000 +0200
+@@ -98,12 +98,16 @@ inline NS_HIDDEN_(bool) NS_finite(double
#ifdef WIN32
// NOTE: '!!' casts an int to bool without spamming MSVC warning C4800.
return !!_finite(d);
@@ -9,3 +9,13 @@
// Darwin has deprecated |finite| and recommends |isfinite|. The former is
// not present in the iOS SDK.
return std::isfinite(d);
+ #else
+- return finite(d);
++#ifdef _GLIBCXX_CMATH
++ return std::isfinite(d);
++#else
++ return isfinite(d);
++#endif
+ #endif
+ }
+