--- 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 #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 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 + #ifdef ANDROID #include #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 #include #include +#include #include #include --- 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 #endif -#ifdef HAVE_A_OUT_H -#include -#endif #ifdef HAVE_MACH_O_NLIST_H #include #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 -#else +#elif defined(__GLIBC__) # include #endif # include --- mozilla-release/toolkit.orig/mozapps/update/updater/updater.cpp +++ mozilla-release/toolkit/mozapps/update/updater/updater.cpp @@ -43,6 +43,7 @@ #include #include +#include #include #include #include @@ -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;