]> granicus.if.org Git - php/commitdiff
Fix #79472: ext/ffi/tests/040.phpt TC fails on Big endian arch
authorChristoph M. Becker <cmbecker69@gmx.de>
Mon, 13 Apr 2020 21:24:40 +0000 (23:24 +0200)
committerDmitry Stogov <dmitry@zend.com>
Tue, 14 Apr 2020 17:31:31 +0000 (20:31 +0300)
For now we are choosing the simplest solution, namely to skip the test
on big-endian architectures.

ext/ffi/tests/040.phpt

index 24bcfb6307e84204612edd7ceea2ab3b655ad4d0..54f48f809e0e9e06d8e715155fb17cc1a90309b1 100644 (file)
@@ -1,7 +1,12 @@
 --TEST--
 FFI 040: Support for scalar types
 --SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php
+require_once('skipif.inc');
+if (pack('S', 0xABCD) !== pack('v', 0xABCD)) {
+    die('skip for little-endian architectures only');
+}
+?>
 --INI--
 ffi.enable=1
 --FILE--