void-packages/srcpkgs/mozjs60/patches/0007-jsproperty-endian.patch

23 lines
586 B
Diff
Raw Normal View History

Bug 1543659 - fix JSPropertySpec::ValueWrapper on 64-bit big-endian platforms
Add some padding to make the union's int32 member correspond to the
low-order bits of the string member. This fixes TypedArray tests on
s390x.
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -1702,7 +1702,12 @@
uintptr_t type;
union {
const char* string;
- int32_t int32;
+ struct {
+#if MOZ_BIG_ENDIAN && JS_BITS_PER_WORD == 64
+ uint32_t padding;
+#endif
+ int32_t int32;
+ };
};
};