diff --git a/src/SPC/builder/linux/SystemUtil.php b/src/SPC/builder/linux/SystemUtil.php index c9e54255..e4fbc3f5 100644 --- a/src/SPC/builder/linux/SystemUtil.php +++ b/src/SPC/builder/linux/SystemUtil.php @@ -183,7 +183,8 @@ class SystemUtil } elseif (is_file('/usr/local/musl/lib/libc.so')) { $result = shell()->execWithResult('/usr/local/musl/lib/libc.so 2>&1', false); } else { - $result = shell()->execWithResult('/lib/ld-musl-x86_64.so.1 2>&1', false); + $arch = php_uname('m'); + $result = shell()->execWithResult("/lib/ld-musl-{$arch}.so.1 2>&1", false); } // Match Version * line // match ldd version: "Version 1.2.3" match 1.2.3 diff --git a/src/globals/common-tests/embed.c b/src/globals/common-tests/embed.c index 85c29921..38d8f39f 100644 --- a/src/globals/common-tests/embed.c +++ b/src/globals/common-tests/embed.c @@ -8,10 +8,10 @@ int main(int argc,char **argv){ zend_stream_init_filename(&file_handle,"embed.php"); - if(php_execute_script(&file_handle) == FAILURE){ + if(!php_execute_script(&file_handle)){ php_printf("Failed to execute PHP script.\n"); } PHP_EMBED_END_BLOCK() return 0; -} \ No newline at end of file +}