|
1 ARC4RANDOM_EXPORT is defined as extern. Fixes issues in arc4random and libevent. |
|
2 Solaris specific changes, will not send upstream. |
|
3 |
|
4 --- a/ipc/chromium/src/third_party/libevent/arc4random.c 2016-03-01 09:29:36.602447178 -0800 |
|
5 +++ b/ipc/chromium/src/third_party/libevent/arc4random.c 2016-03-01 10:17:51.627857034 -0800 |
|
6 @@ -445,8 +445,8 @@ arc4random_stir(void) |
|
7 #endif |
|
8 |
|
9 #ifndef ARC4RANDOM_NOADDRANDOM |
|
10 -ARC4RANDOM_EXPORT void |
|
11 -arc4random_addrandom(const unsigned char *dat, int datlen) |
|
12 +extern void |
|
13 +arc4random_addrandom(uchar_t *dat, size_t datlen) |
|
14 { |
|
15 int j; |
|
16 _ARC4_LOCK(); |
|
17 @@ -477,7 +477,7 @@ arc4random(void) |
|
18 } |
|
19 #endif |
|
20 |
|
21 -ARC4RANDOM_EXPORT void |
|
22 +extern void |
|
23 arc4random_buf(void *_buf, size_t n) |
|
24 { |
|
25 unsigned char *buf = _buf; |
|
26 --- a/config/system-headers 2015-11-03 11:34:17.000000000 +0100 |
|
27 +++ b/config/system-headers 2015-11-09 03:34:24.577525000 +0100 |
|
28 @@ -1064,7 +1064,6 @@ |
|
29 sys/stat.h |
|
30 sys/statvfs.h |
|
31 sys/syscall.h |
|
32 -sys/sysctl.h |
|
33 sys/sysinfo.h |
|
34 sys/sysmp.h |
|
35 sys/syssgi.h |
|
36 --- a/ipc/chromium/src/third_party/libevent/arc4random.c 2016-03-23 11:47:53.743867536 -0700 |
|
37 +++ b/ipc/chromium/src/third_party/libevent/arc4random.c 2016-03-23 11:48:38.956865864 -0700 |
|
38 @@ -41,6 +41,10 @@ |
|
39 * RC4 is a registered trademark of RSA Laboratories. |
|
40 */ |
|
41 |
|
42 +#if defined (OS_SOLARIS) |
|
43 +#undef _EVENT_HAVE_SYS_SYSCTL_H |
|
44 +#endif |
|
45 + |
|
46 #ifndef ARC4RANDOM_EXPORT |
|
47 #define ARC4RANDOM_EXPORT |
|
48 #endif |
|
49 @@ -59,7 +61,7 @@ |
|
50 #include <sys/param.h> |
|
51 #include <sys/time.h> |
|
52 #ifdef _EVENT_HAVE_SYS_SYSCTL_H |
|
53 -#include <sys/sysctl.h> |
|
54 +;//#include <sys/sysctl.h> |
|
55 #endif |
|
56 #endif |
|
57 #include <limits.h> |
|
58 --- a/ipc/chromium/moz.build 2016-03-28 13:41:06.878922929 -0700 |
|
59 +++ b/ipc/chromium/moz.build 2016-03-28 13:42:04.555448660 -0700 |
|
60 @@ -161,6 +161,23 @@ if os_bsd or os_linux: |
|
61 'src/base/message_pump_qt.cc', |
|
62 ] |
|
63 |
|
64 +if os_solaris: |
|
65 + SOURCES += [ |
|
66 + 'src/base/atomicops_internals_x86_gcc.cc', |
|
67 + 'src/base/idle_timer_none.cc', |
|
68 + 'src/base/process_util_linux.cc', |
|
69 + 'src/base/time_posix.cc', |
|
70 + ] |
|
71 + if CONFIG['MOZ_WIDGET_GTK']: |
|
72 + SOURCES += [ |
|
73 + 'src/base/message_pump_glib.cc', |
|
74 + ] |
|
75 + if not CONFIG['MOZ_NATIVE_LIBEVENT']: |
|
76 + SOURCES += [ |
|
77 + 'src/third_party/libevent/devpoll.c', |
|
78 + ] |
|
79 + LOCAL_INCLUDES += ['src/third_party/libevent/solaris'] |
|
80 + |
|
81 ost = CONFIG['OS_TEST'] |
|
82 if '86' not in ost and 'arm' not in ost and 'mips' not in ost: |
|
83 SOURCES += [ |
|
84 diff a/ipc/chromium/src/third_party/libeventcommon.mozbuild b/ipc/chromium/src/third_party/libeventcommon.mozbuild |
|
85 --- a/ipc/chromium/src/third_party/libeventcommon.mozbuild 2015-11-03 11:34:14.000000000 +0100 |
|
86 +++ b/ipc/chromium/src/third_party/libeventcommon.mozbuild 2015-11-09 03:34:24.579311000 +0100 |
|
87 @@ -9,6 +9,7 @@ |
|
88 os_openbsd = 0 |
|
89 os_bsd = 0 |
|
90 os_linux = 0 |
|
91 +os_solaris = 0 |
|
92 |
|
93 if CONFIG['OS_ARCH'] == 'WINNT': |
|
94 os_win = 1 |
|
95 @@ -21,6 +22,9 @@ else: |
|
96 'NetBSD', 'OpenBSD']: |
|
97 os_bsd = 1 |
|
98 libevent_include_suffix = 'bsd' |
|
99 + elif CONFIG['OS_ARCH'] == 'SunOS': |
|
100 + os_solaris = 1 |
|
101 + libevent_include_suffix = 'solaris' |
|
102 else: |
|
103 os_linux = 1 |
|
104 if CONFIG['OS_TARGET'] == 'Android': |
|
105 diff a/ipc/chromium/src/third_party/libevent/event.c b/ipc/chromium/src/third_party/libevent/event.c |
|
106 --- a/ipc/chromium/src/third_party/libevent/event.c 2015-11-03 11:34:14.000000000 +0100 |
|
107 +++ b/ipc/chromium/src/third_party/libevent/event.c 2015-11-09 03:34:24.485030000 +0100 |
|
108 @@ -70,7 +70,7 @@ |
|
109 #include "util-internal.h" |
|
110 |
|
111 #ifdef _EVENT_HAVE_EVENT_PORTS |
|
112 -extern const struct eventop evportops; |
|
113 +//extern const struct eventop evportops; |
|
114 #endif |
|
115 #ifdef _EVENT_HAVE_SELECT |
|
116 extern const struct eventop selectops; |
|
117 @@ -79,7 +79,7 @@ extern const struct eventop selectops; |
|
118 extern const struct eventop pollops; |
|
119 #endif |
|
120 #ifdef _EVENT_HAVE_EPOLL |
|
121 -extern const struct eventop epollops; |
|
122 +//extern const struct eventop epollops; |
|
123 #endif |
|
124 #ifdef _EVENT_HAVE_WORKING_KQUEUE |
|
125 extern const struct eventop kqops; |
|
126 @@ -94,13 +94,13 @@ extern const struct eventop win32ops; |
|
127 /* Array of backends in order of preference. */ |
|
128 static const struct eventop *eventops[] = { |
|
129 #ifdef _EVENT_HAVE_EVENT_PORTS |
|
130 - &evportops, |
|
131 + //&evportops, |
|
132 #endif |
|
133 #ifdef _EVENT_HAVE_WORKING_KQUEUE |
|
134 &kqops, |
|
135 #endif |
|
136 #ifdef _EVENT_HAVE_EPOLL |
|
137 - &epollops, |
|
138 + //&epollops, |
|
139 #endif |
|
140 #ifdef _EVENT_HAVE_DEVPOLL |
|
141 &devpollops, |
|
142 @@ -2883,8 +2883,8 @@ |
|
143 #endif |
|
144 if (evsig_global_setup_locks_(enable_locks) < 0) |
|
145 return -1; |
|
146 - if (evutil_secure_rng_global_setup_locks_(enable_locks) < 0) |
|
147 - return -1; |
|
148 +// if (evutil_secure_rng_global_setup_locks_(enable_locks) < 0) |
|
149 +// return -1; |
|
150 return 0; |
|
151 } |
|
152 #endif |