Bug 1125580 - Limit <asm/hwcap.h> inclusion to Linux ARM to unbreak non-Linux. r=jandem
authorJan Beich <jbeich@vfemail.net>
Sat, 24 Jan 2015 18:27:00 -0500
changeset 239196 ff7bc5846c5fc4491ff4e8166547e1c9554d8b1f
parent 239195 86e9422940ed3d77d81fbc4f0a02c36ce66caf1e
child 239197 c1237502c5e24df9e96dc13986c8ffa260c35901
push id489
push usermcmanus@ducksong.com
push dateTue, 27 Jan 2015 01:44:53 +0000
reviewersjandem
bugs1125580
milestone38.0a1
Bug 1125580 - Limit <asm/hwcap.h> inclusion to Linux ARM to unbreak non-Linux. r=jandem
js/src/jit/arm/Architecture-arm.cpp
--- a/js/src/jit/arm/Architecture-arm.cpp
+++ b/js/src/jit/arm/Architecture-arm.cpp
@@ -11,17 +11,17 @@
 #endif
 
 #include <fcntl.h>
 #include <unistd.h>
 
 #include "jit/arm/Assembler-arm.h"
 #include "jit/RegisterSets.h"
 
-#if defined(ANDROID) || defined(JS_ARM_SIMULATOR)
+#if !defined(__linux__) || defined(ANDROID) || defined(JS_ARM_SIMULATOR)
 // The Android NDK and B2G do not include the hwcap.h kernel header, and it is not
 // defined when building the simulator, so inline the header defines we need.
 # define HWCAP_VFP        (1 << 6)
 # define HWCAP_NEON       (1 << 12)
 # define HWCAP_VFPv3      (1 << 13)
 # define HWCAP_VFPv3D16   (1 << 14) /* also set for VFPv4-D16 */
 # define HWCAP_VFPv4      (1 << 16)
 # define HWCAP_IDIVA      (1 << 17)