From c2251d86fec1cf44570aeef10b67c4c778e7b042 Mon Sep 17 00:00:00 2001 From: Weilin Du Date: Mon, 19 Oct 2026 19:22:59 +0800 Subject: [PATCH] CI: Fix gh20532.phpt on FreeBSD --- ext/sockets/tests/gh20532.phpt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/sockets/tests/gh20532.phpt b/ext/sockets/tests/gh20532.phpt index 2bec6953dac4..35030ecd2794 100644 --- a/ext/sockets/tests/gh20532.phpt +++ b/ext/sockets/tests/gh20532.phpt @@ -6,7 +6,8 @@ sockets AF_INET], $error_code) === false && in_array($error_code, [EAI_FAMILY, EAI_ADDRFAMILY, EAI_NONAME, EAI_NODATA])); +// Prevent name resolution on platforms that do not recognize an address of the wrong family. +var_dump(socket_addrinfo_lookup("2001:db8::1", null, ['ai_family' => AF_INET, 'ai_flags' => AI_NUMERICHOST], $error_code) === false && in_array($error_code, [EAI_FAMILY, EAI_ADDRFAMILY, EAI_NONAME, EAI_NODATA])); var_dump(socket_addrinfo_lookup("example.com", "http", ['ai_socktype' => SOCK_RAW, 'ai_flags' => 2147483647], $error_code) === false && in_array($error_code, [EAI_SOCKTYPE, EAI_SERVICE, EAI_BADFLAGS, EAI_NONAME])); ?> --EXPECT--