gcc: fix bad-mapper-3.C test failures on some hosts
This test tries to open an IPv6 socket to 'localhost', but some distros
(such as ubuntu 24.04) only have an IPv4 address for localhost and use
ip6-localhost for ::1. This means the lookups fail in a way that the
test was not expecting, and the test fails.
Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>