aboutsummaryrefslogtreecommitdiffstats
path: root/main/xulrunner/fix-tools.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-10-12 10:47:20 +0000
committerTimo Teräs <timo.teras@iki.fi>2013-10-12 10:47:20 +0000
commit2df82e3d3d783c51aaba69c49ddb00a9f25ab138 (patch)
treec729c1aba3f4aded953cc04247a9255250507c7d /main/xulrunner/fix-tools.patch
parent69c09e1e4a0b3ff3e0b26151807922bd7b44e607 (diff)
downloadaports-2df82e3d3d783c51aaba69c49ddb00a9f25ab138.tar.bz2
aports-2df82e3d3d783c51aaba69c49ddb00a9f25ab138.tar.xz
main/xulrunner: fix musl build
Based heavily on GregorR's musl-pkgsrc-patches firefox patch, but slightly differs at places to suit Alpine needs.
Diffstat (limited to 'main/xulrunner/fix-tools.patch')
-rw-r--r--main/xulrunner/fix-tools.patch117
1 files changed, 117 insertions, 0 deletions
diff --git a/main/xulrunner/fix-tools.patch b/main/xulrunner/fix-tools.patch
new file mode 100644
index 0000000000..1d0051bb3f
--- /dev/null
+++ b/main/xulrunner/fix-tools.patch
@@ -0,0 +1,117 @@
+--- mozilla-release/tools.orig/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
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
++#include <sys/types.h>
+ #include "PlatformMacros.h"
+ #include "nsAutoPtr.h"
+
+--- mozilla-release/tools.orig/profiler/platform-linux.cc
++++ mozilla-release/tools/profiler/platform-linux.cc
+@@ -73,7 +73,7 @@
+
+ #define SIGNAL_SAVE_PROFILE SIGUSR2
+
+-#if defined(__GLIBC__)
++#if 1
+ // 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/tools/profiler/platform.h
+@@ -29,6 +29,8 @@
+ #ifndef TOOLS_PLATFORM_H_
+ #define TOOLS_PLATFORM_H_
+
++#include <sys/types.h>
++
+ #ifdef ANDROID
+ #include <android/log.h>
+ #else
+--- 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"
+
+-#ifndef __GLIBC__
++#ifdef ANDRIOD
+ /* a crapy version of getline, because it's not included in bionic */
+ static ssize_t getline(char **lineptr, size_t *n, FILE *stream)
+ {
+--- 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)
+ {
+ int rv = OK;