Package: icedove / 1:52.3.0-4~deb8u2

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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
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
---
 mozilla/ipc/chromium/src/base/file_util_posix.cc         |  2 +-
 mozilla/ipc/chromium/src/base/platform_thread.h          |  2 +-
 mozilla/ipc/chromium/src/base/platform_thread_posix.cc   |  2 +-
 mozilla/ipc/chromium/src/base/port.h                     |  2 +-
 mozilla/ipc/chromium/src/base/process_util.h             |  2 +-
 mozilla/ipc/chromium/src/base/process_util_posix.cc      |  6 +++++-
 mozilla/media/webrtc/signaling/signaling.gyp             | 16 ++++++++++++++++
 mozilla/media/webrtc/signaling/src/sdp/sipcc/cpr_types.h |  2 +-
 mozilla/media/webrtc/trunk/build/build_config.h          |  6 +++++-
 .../testing/gtest/include/gtest/internal/gtest-port.h    |  6 ++++--
 mozilla/security/sandbox/chromium/build/build_config.h   |  4 +++-
 11 files changed, 39 insertions(+), 11 deletions(-)

diff --git a/mozilla/ipc/chromium/src/base/file_util_posix.cc b/mozilla/ipc/chromium/src/base/file_util_posix.cc
index d648974..a408640 100644
--- a/mozilla/ipc/chromium/src/base/file_util_posix.cc
+++ b/mozilla/ipc/chromium/src/base/file_util_posix.cc
@@ -279,7 +279,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/mozilla/ipc/chromium/src/base/platform_thread.h b/mozilla/ipc/chromium/src/base/platform_thread.h
index 727a13a..c122a1c 100644
--- a/mozilla/ipc/chromium/src/base/platform_thread.h
+++ b/mozilla/ipc/chromium/src/base/platform_thread.h
@@ -24,7 +24,7 @@ typedef void* PlatformThreadHandle;  // HANDLE
 #elif defined(OS_POSIX)
 #include <pthread.h>
 typedef pthread_t PlatformThreadHandle;
-#if defined(OS_LINUX) || defined(OS_OPENBSD) || defined(__GLIBC__)
+#if defined(OS_LINUX) || defined(OS_OPENBSD) || defined(__GLIBC__) || defined(OS_HURD)
 #include <unistd.h>
 typedef pid_t PlatformThreadId;
 #elif defined(OS_BSD)
diff --git a/mozilla/ipc/chromium/src/base/platform_thread_posix.cc b/mozilla/ipc/chromium/src/base/platform_thread_posix.cc
index 29d1e21..6843dfd 100644
--- a/mozilla/ipc/chromium/src/base/platform_thread_posix.cc
+++ b/mozilla/ipc/chromium/src/base/platform_thread_posix.cc
@@ -60,7 +60,7 @@ PlatformThreadId PlatformThread::CurrentId() {
    return getpid();
 #endif
 #endif
-#elif defined(OS_OPENBSD) || defined(__GLIBC__)
+#elif defined(OS_OPENBSD) || defined(__GLIBC__) || defined(OS_HURD)
   return (intptr_t) (pthread_self());
 #elif defined(OS_NETBSD)
   return _lwp_self();
diff --git a/mozilla/ipc/chromium/src/base/port.h b/mozilla/ipc/chromium/src/base/port.h
index d206d25..13a90bf 100644
--- a/mozilla/ipc/chromium/src/base/port.h
+++ b/mozilla/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/mozilla/ipc/chromium/src/base/process_util.h b/mozilla/ipc/chromium/src/base/process_util.h
index 4df1f29..cda1c15 100644
--- a/mozilla/ipc/chromium/src/base/process_util.h
+++ b/mozilla/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/mozilla/ipc/chromium/src/base/process_util_posix.cc b/mozilla/ipc/chromium/src/base/process_util_posix.cc
index 666a120..3bf627b 100644
--- a/mozilla/ipc/chromium/src/base/process_util_posix.cc
+++ b/mozilla/ipc/chromium/src/base/process_util_posix.cc
@@ -128,6 +128,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.
@@ -211,7 +215,7 @@ void CloseSuperfluousFds(const base::InjectiveMultimap& saved_mapping) {
 void SetAllFDsToCloseOnExec() {
 #if defined(OS_LINUX)
   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/mozilla/media/webrtc/signaling/signaling.gyp b/mozilla/media/webrtc/signaling/signaling.gyp
index ee19411..0c69066 100644
--- a/mozilla/media/webrtc/signaling/signaling.gyp
+++ b/mozilla/media/webrtc/signaling/signaling.gyp
@@ -364,6 +364,22 @@
             '_FORTIFY_SOURCE=2',
           ],
 
+          'cflags_mozilla': [
+          ],
+        }],
+        ['OS=="gnu"', {
+          'include_dirs': [
+          ],
+          'defines': [
+            'OS_HURD',
+            'WEBRTC_POSIX',
+            'SIP_OS_HURD',
+            'HURD',
+            '_GNU_SOURCE',
+            'GIPS_VER=3510',
+            'SECLIB_OPENSSL',
+          ],
+
           'cflags_mozilla': [
           ],
         }],
diff --git a/mozilla/media/webrtc/signaling/src/sdp/sipcc/cpr_types.h b/mozilla/media/webrtc/signaling/src/sdp/sipcc/cpr_types.h
index 808067e..d43eaaa 100644
--- a/mozilla/media/webrtc/signaling/src/sdp/sipcc/cpr_types.h
+++ b/mozilla/media/webrtc/signaling/src/sdp/sipcc/cpr_types.h
@@ -5,7 +5,7 @@
 #ifndef _CPR_TYPES_H_
 #define _CPR_TYPES_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/mozilla/media/webrtc/trunk/build/build_config.h b/mozilla/media/webrtc/trunk/build/build_config.h
index 55ed38c..dcb3d47 100644
--- a/mozilla/media/webrtc/trunk/build/build_config.h
+++ b/mozilla/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/mozilla/media/webrtc/trunk/testing/gtest/include/gtest/internal/gtest-port.h b/mozilla/media/webrtc/trunk/testing/gtest/include/gtest/internal/gtest-port.h
index 3a595f4..d429e6a 100644
--- a/mozilla/media/webrtc/trunk/testing/gtest/include/gtest/internal/gtest-port.h
+++ b/mozilla/media/webrtc/trunk/testing/gtest/include/gtest/internal/gtest-port.h
@@ -259,6 +259,8 @@
 # define GTEST_OS_OPENBSD 1
 #elif defined __QNX__
 # define GTEST_OS_QNX 1
+#elif defined(__GNU__)
+# define GTEST_OS_HURD 1
 #endif  // __CYGWIN__
 
 #ifndef GTEST_LANG_CXX11
@@ -450,7 +452,7 @@
 // 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
@@ -605,7 +607,7 @@ using ::std::tuple_size;
      (GTEST_OS_MAC && !GTEST_OS_IOS) || \
      (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/mozilla/security/sandbox/chromium/build/build_config.h b/mozilla/security/sandbox/chromium/build/build_config.h
index d8c3db6..806b432 100644
--- a/mozilla/security/sandbox/chromium/build/build_config.h
+++ b/mozilla/security/sandbox/chromium/build/build_config.h
@@ -46,6 +46,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
 #define TOOLKIT_VIEWS 1
@@ -75,7 +77,7 @@
 // more specific macro.
 #if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_FREEBSD) ||     \
     defined(OS_OPENBSD) || defined(OS_SOLARIS) || defined(OS_ANDROID) ||  \
-    defined(OS_NACL) || defined(OS_QNX)
+    defined(OS_NACL) || defined(OS_QNX) || defined(OS_HURD)
 #define OS_POSIX 1
 #endif