Fix zig-cc strlcpy missing issue with swoole+openssl

This commit is contained in:
crazywhalecc 2026-03-18 12:07:19 +08:00
parent b1a59dad79
commit b5b917ce32
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680

View File

@ -67,6 +67,9 @@ class ZigToolchain implements UnixToolchainInterface
$extra_vars = getenv('SPC_EXTRA_PHP_VARS') ?: '';
GlobalEnvManager::putenv("SPC_EXTRA_PHP_VARS=php_cv_have_avx512=no php_cv_have_avx512vbmi=no {$extra_vars}");
}
// zig-cc/clang treats strlcpy/strlcat as compiler builtins, so configure link tests pass (HAVE_STRLCPY=1)
$extra_vars = getenv('SPC_EXTRA_PHP_VARS') ?: '';
GlobalEnvManager::putenv("SPC_EXTRA_PHP_VARS=ac_cv_func_strlcpy=no ac_cv_func_strlcat=no {$extra_vars}");
}
public function getCompilerInfo(): ?string