Package: thunderbird / 1:60.8.0-1~deb9u1

porting-kfreebsd-hurd/adding-missed-HURD-adoptions.patch Patch series | download
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
From: Carsten Schoenert <c.schoenert@t-online.de>
Date: Sun, 24 Apr 2016 20:49:46 +0200
Subject: adding missed HURD adoptions

Based on https://lists.alioth.debian.org/pipermail/pkg-mozilla-maintainers/2016-April/027634.html
---
 ipc/chromium/src/base/file_util_posix.cc                            | 2 +-
 ipc/chromium/src/base/platform_thread.h                             | 2 +-
 ipc/chromium/src/base/platform_thread_posix.cc                      | 2 +-
 ipc/chromium/src/base/port.h                                        | 2 +-
 ipc/chromium/src/base/process_util.h                                | 2 +-
 ipc/chromium/src/base/process_util_posix.cc                         | 6 +++++-
 media/webrtc/signaling/src/sdp/sipcc/cpr_types.h                    | 2 +-
 media/webrtc/trunk/build/build_config.h                             | 6 +++++-
 .../gtests/google_test/gtest/include/gtest/internal/gtest-port.h    | 6 ++++--
 security/sandbox/chromium/build/build_config.h                      | 4 +++-
 10 files changed, 23 insertions(+), 11 deletions(-)

diff --git a/ipc/chromium/src/base/file_util_posix.cc b/ipc/chromium/src/base/file_util_posix.cc
index 2b0d221..71346d8 100644
--- a/ipc/chromium/src/base/file_util_posix.cc
+++ b/ipc/chromium/src/base/file_util_posix.cc
@@ -263,7 +263,7 @@ bool GetTempDir(FilePath* path) {
 }
 
 bool GetShmemTempDir(FilePath* path) {
-#if defined(OS_LINUX) && !defined(ANDROID)
+#if (defined(OS_LINUX) && !defined(ANDROID)) || defined(OS_HURD)
   *path = FilePath("/dev/shm");
   return true;
 #else
diff --git a/ipc/chromium/src/base/platform_thread.h b/ipc/chromium/src/base/platform_thread.h
index afa344c..0103ef1 100644
--- a/ipc/chromium/src/base/platform_thread.h
+++ b/ipc/chromium/src/base/platform_thread.h
@@ -25,7 +25,7 @@ typedef void* PlatformThreadHandle;  // HANDLE
 #include <pthread.h>
 typedef pthread_t PlatformThreadHandle;
 #if defined(OS_LINUX) || defined(OS_OPENBSD) || defined(OS_SOLARIS) || \
-    defined(__GLIBC__)
+    defined(__GLIBC__) || defined(OS_HURD)
 #include <unistd.h>
 typedef pid_t PlatformThreadId;
 #elif defined(OS_BSD)
diff --git a/ipc/chromium/src/base/platform_thread_posix.cc b/ipc/chromium/src/base/platform_thread_posix.cc
index 5f52eeb..816e8ff 100644
--- a/ipc/chromium/src/base/platform_thread_posix.cc
+++ b/ipc/chromium/src/base/platform_thread_posix.cc
@@ -57,7 +57,7 @@ PlatformThreadId PlatformThread::CurrentId() {
 #else
    return getpid();
 #endif
-#elif defined(OS_OPENBSD) || defined(OS_SOLARIS) || defined(__GLIBC__)
+#elif defined(OS_OPENBSD) || defined(OS_SOLARIS) || defined(__GLIBC__) || defined(OS_HURD)
   return (intptr_t)(pthread_self());
 #elif defined(OS_NETBSD)
   return _lwp_self();
diff --git a/ipc/chromium/src/base/port.h b/ipc/chromium/src/base/port.h
index 322626b..3d500b6 100644
--- a/ipc/chromium/src/base/port.h
+++ b/ipc/chromium/src/base/port.h
@@ -58,7 +58,7 @@ namespace base {
 // Define an OS-neutral wrapper for shared library entry points
 #if defined(OS_WIN)
 #define API_CALL __stdcall
-#elif defined(OS_LINUX) || defined(OS_MACOSX)
+#elif defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_HURD)
 #define API_CALL
 #endif
 
diff --git a/ipc/chromium/src/base/process_util.h b/ipc/chromium/src/base/process_util.h
index 09006e3..29aabfd 100644
--- a/ipc/chromium/src/base/process_util.h
+++ b/ipc/chromium/src/base/process_util.h
@@ -19,7 +19,7 @@
 #ifndef STDOUT_FILENO
 #define STDOUT_FILENO 1
 #endif
-#elif defined(OS_LINUX) || defined(__GLIBC__)
+#elif defined(OS_LINUX) || defined(__GLIBC__) || defined(OS_HURD)
 #include <dirent.h>
 #include <limits.h>
 #include <sys/types.h>
diff --git a/ipc/chromium/src/base/process_util_posix.cc b/ipc/chromium/src/base/process_util_posix.cc
index 40f8209..c1a4807 100644
--- a/ipc/chromium/src/base/process_util_posix.cc
+++ b/ipc/chromium/src/base/process_util_posix.cc
@@ -130,6 +130,10 @@ void CloseSuperfluousFds(const base::InjectiveMultimap& saved_mapping) {
   static const rlim_t kSystemDefaultMaxFds = 1024;
   // at least /dev/fd will exist
   static const char kFDDir[] = "/dev/fd";
+#elif defined(OS_HURD)
+  static const rlim_t kSystemDefaultMaxFds = 1024;
+  // Currently always empty, but it exists
+  static const char kFDDir[] = "/dev/fd";
 #endif
 
   // Get the maximum number of FDs possible.
@@ -205,7 +209,7 @@ void CloseSuperfluousFds(const base::InjectiveMultimap& saved_mapping) {
 void SetAllFDsToCloseOnExec() {
 #if defined(OS_LINUX) || defined(OS_SOLARIS)
   const char fd_dir[] = "/proc/self/fd";
-#elif defined(OS_MACOSX) || defined(OS_BSD)
+#elif defined(OS_MACOSX) || defined(OS_BSD) || defined(OS_HURD)
   const char fd_dir[] = "/dev/fd";
 #endif
   ScopedDIR dir_closer(opendir(fd_dir));
diff --git a/media/webrtc/signaling/src/sdp/sipcc/cpr_types.h b/media/webrtc/signaling/src/sdp/sipcc/cpr_types.h
index f048e72..8bb0b59 100644
--- a/media/webrtc/signaling/src/sdp/sipcc/cpr_types.h
+++ b/media/webrtc/signaling/src/sdp/sipcc/cpr_types.h
@@ -7,7 +7,7 @@
 
 #include <inttypes.h>
 
-#if defined SIP_OS_LINUX
+#if defined SIP_OS_LINUX || defined(SIP_OS_HURD)
 #include "cpr_linux_types.h"
 #elif defined SIP_OS_WINDOWS
 #include "cpr_win_types.h"
diff --git a/media/webrtc/trunk/build/build_config.h b/media/webrtc/trunk/build/build_config.h
index 168fbd6..312674b 100644
--- a/media/webrtc/trunk/build/build_config.h
+++ b/media/webrtc/trunk/build/build_config.h
@@ -37,6 +37,9 @@
 #elif defined(_WIN32)
 #define OS_WIN 1
 #define TOOLKIT_VIEWS 1
+#elif defined(__GNU__)
+#define OS_HURD 1
+#define TOOLKIT_GTK
 #elif defined(__DragonFly__)
 #define OS_DRAGONFLY 1
 #define TOOLKIT_GTK
@@ -70,7 +73,8 @@
 // For access to standard POSIXish features, use OS_POSIX instead of a
 // more specific macro.
 #if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) ||	\
-    defined(OS_SOLARIS) || defined(OS_ANDROID) || defined(OS_NACL)
+    defined(OS_SOLARIS) || defined(OS_ANDROID) || defined(OS_NACL) ||   \
+    defined(OS_HURD)
 #define OS_POSIX 1
 #endif
 
diff --git a/security/nss/gtests/google_test/gtest/include/gtest/internal/gtest-port.h b/security/nss/gtests/google_test/gtest/include/gtest/internal/gtest-port.h
index f376dfa..0f702eb 100644
--- a/security/nss/gtests/google_test/gtest/include/gtest/internal/gtest-port.h
+++ b/security/nss/gtests/google_test/gtest/include/gtest/internal/gtest-port.h
@@ -345,6 +345,8 @@
 # define GTEST_OS_OPENBSD 1
 #elif defined __QNX__
 # define GTEST_OS_QNX 1
+#elif defined(__GNU__)
+# define GTEST_OS_HURD 1
 #endif  // __CYGWIN__
 
 // Macros for disabling Microsoft Visual C++ warnings.
@@ -611,7 +613,7 @@ struct _RTL_CRITICAL_SECTION;
 // To disable threading support in Google Test, add -DGTEST_HAS_PTHREAD=0
 // to your compiler flags.
 # define GTEST_HAS_PTHREAD (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_HPUX \
-    || GTEST_OS_QNX)
+    || GTEST_OS_QNX || GTEST_OS_HURD)
 #endif  // GTEST_HAS_PTHREAD
 
 #if GTEST_HAS_PTHREAD
@@ -791,7 +793,7 @@ using ::std::tuple_size;
      (GTEST_OS_MAC && !GTEST_OS_IOS) || GTEST_OS_IOS_SIMULATOR || \
      (GTEST_OS_WINDOWS_DESKTOP && _MSC_VER >= 1400) || \
      GTEST_OS_WINDOWS_MINGW || GTEST_OS_AIX || GTEST_OS_HPUX || \
-     GTEST_OS_OPENBSD || GTEST_OS_QNX)
+     GTEST_OS_OPENBSD || GTEST_OS_QNX || GTEST_OS_HURD)
 # define GTEST_HAS_DEATH_TEST 1
 # include <vector>  // NOLINT
 #endif
diff --git a/security/sandbox/chromium/build/build_config.h b/security/sandbox/chromium/build/build_config.h
index 8e5fcd7..9172091 100644
--- a/security/sandbox/chromium/build/build_config.h
+++ b/security/sandbox/chromium/build/build_config.h
@@ -47,6 +47,8 @@
 // we really are using glibc, not uClibc pretending to be glibc
 #define LIBC_GLIBC 1
 #endif
+#elif defined(__GNU__)
+#define OS_HURD 1
 #elif defined(_WIN32)
 #define OS_WIN 1
 #elif defined(__Fuchsia__)
@@ -84,7 +86,7 @@
 #if defined(OS_AIX) || defined(OS_ANDROID) || defined(OS_FREEBSD) ||  \
     defined(OS_FUCHSIA) || defined(OS_LINUX) || defined(OS_MACOSX) || \
     defined(OS_NACL) || defined(OS_NETBSD) || defined(OS_OPENBSD) ||  \
-    defined(OS_QNX) || defined(OS_SOLARIS)
+    defined(OS_QNX) || defined(OS_SOLARIS) || defined(OS_HURD)
 #define OS_POSIX 1
 #endif