1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
--- 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/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;
|