--- a/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h +++ b/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h @@ -53,9 +53,10 @@ #include #endif -#ifdef HAVE_A_OUT_H +#if 0 #include #endif + #ifdef HAVE_MACH_O_NLIST_H #include #endif --- a/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc +++ b/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc @@ -834,9 +834,9 @@ // last slash, or the whole filename if there are no slashes. string BaseFileName(const string &filename) { // Lots of copies! basename's behavior is less than ideal. - char *c_filename = strdup(filename.c_str()); - string base = basename(c_filename); - free(c_filename); + const char *c_filename = filename.c_str(); + const char *p = strrchr(c_filename, '/'); + string base = p ? p+1 : c_filename; return base; } --- a/mozilla-release/tools/profiler/local_debug_info_symbolizer.cc +++ b/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" --- a/mozilla-release/tools/profiler/platform-linux.cc +++ b/mozilla-release/tools/profiler/platform-linux.cc @@ -84,7 +84,7 @@ #define SIGNAL_SAVE_PROFILE SIGUSR2 -#if defined(__GLIBC__) +#if 1 // glibc doesn't implement gettid(2). #include pid_t gettid() --- a/mozilla-release/tools/profiler/platform.h +++ b/mozilla-release/tools/profiler/platform.h @@ -29,6 +29,8 @@ #ifndef TOOLS_PLATFORM_H_ #define TOOLS_PLATFORM_H_ +#include + #ifdef ANDROID #include #else --- a/mozilla-release/tools/profiler/LulElf.cpp +++ b/mozilla-release/tools/profiler/LulElf.cpp @@ -579,10 +579,10 @@ // Return the non-directory portion of FILENAME: the portion after the // last slash, or the whole filename if there are no slashes. string BaseFileName(const string &filename) { - // Lots of copies! basename's behavior is less than ideal. - char *c_filename = strdup(filename.c_str()); - string base = basename(c_filename); - free(c_filename); + // basename's behavior is less than ideal so avoid it + const char *c_filename = filename.c_str(); + const char *p = strrchr(c_filename, '/'); + string base = p ? p+1 : c_filename; return base; } --- a/mozilla-release/media/mtransport/third_party/nICEr/src/stun/addrs.c +++ b/mozilla-release/media/mtransport/third_party/nICEr/src/stun/addrs.c @@ -45,7 +45,6 @@ #include #include #ifndef ANDROID -#include #include #else #include @@ -63,8 +61,8 @@ #include #else #include -#include #include +#include #include #ifndef ANDROID #include --- a/mozilla-release/memory/mozjemalloc/jemalloc.c +++ b/mozilla-release/memory/mozjemalloc/jemalloc.c @@ -337,7 +337,6 @@ #include #include #if !defined(MOZ_MEMORY_SOLARIS) && !defined(MOZ_MEMORY_ANDROID) -#include #endif #include #ifndef MOZ_MEMORY --- a/mozilla-release/netwerk/sctp/src/netinet/sctp_os_userspace.h +++ b/mozilla-release/netwerk/sctp/src/netinet/sctp_os_userspace.h @@ -427,7 +427,7 @@ /* #include in FreeBSD defines MSIZE */ /* #include */ /* #include */ -#if defined(__Userspace_os_Windows) +#if 1 #include #else #include --- a/mozilla-release/media/webrtc/signaling/src/sipcc/cpr/include/cpr_threads.h +++ b/mozilla-release/media/webrtc/signaling/src/sipcc/cpr/include/cpr_threads.h @@ -30,7 +30,7 @@ uint32_t threadId; union { void *handlePtr; - uint64_t handleInt; + unsigned handleInt; } u; } cpr_thread_t; --- a/mozilla-release/ipc/chromium/src/base/debug_util_posix.cc +++ b/mozilla-release/ipc/chromium/src/base/debug_util_posix.cc @@ -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 #include --- a/mozilla-release/ipc/chromium/src/base/file_util.h +++ b/mozilla-release/ipc/chromium/src/base/file_util.h @@ -14,10 +14,15 @@ #include #elif defined(ANDROID) #include +#define NO_FTS #elif defined(OS_POSIX) #include -#include #include +#ifdef __GLIBC__ +#include +#else +#define NO_FTS +#endif #endif #include --- a/mozilla-release/ipc/chromium/src/base/file_util_posix.cc +++ b/mozilla-release/ipc/chromium/src/base/file_util_posix.cc @@ -8,13 +8,13 @@ #include #include #include -#ifndef ANDROID +#ifndef NO_FTS #include #endif #include #include #include -#include +#include #include #define _DARWIN_USE_64_BIT_INODE // Use 64-bit inode data structures #include @@ -67,7 +67,7 @@ if (!recursive) return (rmdir(path_str) == 0); -#ifdef ANDROID +#ifdef NO_FTS // XXX Need ftsless impl for bionic return false; #else @@ -140,7 +140,7 @@ return false; } -#ifdef ANDROID +#ifdef NO_FTS // XXX Need ftsless impl for bionic return false; #else --- a/mozilla-release/netwerk/sctp/src/netinet/sctp_os_userspace.h +++ b/mozilla-release/netwerk/sctp/src/netinet/sctp_os_userspace.h @@ -400,11 +400,8 @@ }; #else /* !defined(Userspace_os_Windows) */ -#include /* needed? added from old __FreeBSD__ */ #include -#if defined(__Userspace_os_DragonFly) || defined(__Userspace_os_FreeBSD) || defined(__Userspace_os_Linux) || defined(__Userspace_os_NetBSD) || defined(__Userspace_os_OpenBSD) || defined(ANDROID) #include -#endif typedef pthread_mutex_t userland_mutex_t; typedef pthread_cond_t userland_cond_t; typedef pthread_t userland_thread_t; --- a/mozilla-release/netwerk/sctp/src/netinet/sctp_pcb.c +++ b/mozilla-release/netwerk/sctp/src/netinet/sctp_pcb.c @@ -30,6 +30,9 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ +#define _BSD_SOURCE /* for IPPORT_RESERVED */ +#include + #ifdef __FreeBSD__ #include __FBSDID("$FreeBSD: head/sys/netinet/sctp_pcb.c 258765 2013-11-30 12:51:19Z tuexen $"); --- a/mozilla-release/netwerk/sctp/src/user_queue.h +++ b/mozilla-release/netwerk/sctp/src/user_queue.h @@ -31,7 +31,7 @@ #ifndef _USER_QUEUE_H_ #define _USER_QUEUE_H_ -#if !defined (__Userspace_os_Windows) +#if defined(__Userspace_os_FreeBSD) #include #endif /* --- a/mozilla-release/tools/profiler/platform-linux.cc +++ b/mozilla-release/tools/profiler/platform-linux.cc @@ -625,10 +625,10 @@ { MOZ_ASSERT(aContext); ucontext_t* pContext = reinterpret_cast(aContext); - if (!getcontext(pContext)) { + /*if (!getcontext(pContext)) { context = pContext; SetSampleContext(this, aContext); - } + }*/ } void OS::SleepMicro(int microseconds)