mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 12:54:52 +08:00
use correct musl lib
This commit is contained in:
parent
a0f474db20
commit
206bc95ee2
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user