Bug 1352236 - Work around missing GETRANDOM_NR when building against older versions of glibc. r=luke
authorCharles Robertson <cgrobertson@suse.com>
Thu, 30 Mar 2017 14:53:00 -0400
changeset 351051 18e8f6994472
parent 351050 9ed543a5a37a
child 351052 b6380473fdc5
push id31599
push usercbook@mozilla.com
push dateTue, 04 Apr 2017 10:35:26 +0000
treeherdermozilla-central@891981e67948 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs1352236
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1352236 - Work around missing GETRANDOM_NR when building against older versions of glibc. r=luke
js/src/jsmath.cpp
--- a/js/src/jsmath.cpp
+++ b/js/src/jsmath.cpp
@@ -63,16 +63,29 @@
 // Older glibc versions don't define SYS_getrandom, so we define it here if
 // it's not available. See bug 995069.
 # if defined(__x86_64__)
 #  define GETRANDOM_NR 318
 # elif defined(__i386__)
 #  define GETRANDOM_NR 355
 # elif defined(__arm__)
 #  define GETRANDOM_NR 384
+// Added other architectures:
+# elif defined(__ppc64le__)
+#  define GETRANDOM_NR 359
+# elif defined(__PPC64LE__)
+#  define GETRANDOM_NR 359
+# elif defined(__ppc64__)
+#  define GETRANDOM_NR 359
+# elif defined(__PPC64__)
+#  define GETRANDOM_NR 359
+# elif defined(__s390x__)
+#  define GETRANDOM_NR 349
+# elif defined(__s390__)
+#  define GETRANDOM_NR 349
 # endif
 
 # if defined(SYS_getrandom)
 // We have SYS_getrandom. Use it to check GETRANDOM_NR. Only do this if we set
 // GETRANDOM_NR so tier 3 platforms with recent glibc are not forced to define
 // it for no good reason.
 #  if defined(GETRANDOM_NR)
 static_assert(GETRANDOM_NR == SYS_getrandom,