From 15cad00a91d039dc7336344a357eda6c3dcb416a Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Tue, 29 Sep 2026 16:36:23 +0200 Subject: meson: check for getifaddrs with the socket libraries On illumos, getifaddrs() lives in libsocket, not in libc. The has_function() check did not link against the socket libraries, so it failed there, HAVE_GETIFADDRS was not defined and guest-network-get-interfaces was not built into qemu-ga, although commands-posix.c already has the Solaris/illumos code for it. Pass the socket dependency (empty on most platforms) to the check. --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 40e3f4ec44..8a22daccc7 100644 --- a/meson.build +++ b/meson.build @@ -2638,7 +2638,7 @@ config_host_data.set('CONFIG_TIMERFD', cc.has_function('timerfd_create')) config_host_data.set('CONFIG_GETLOADAVG', cc.has_function('getloadavg')) config_host_data.set('CONFIG_ARPA_INET_64', cc.has_function('htonll')) config_host_data.set('HAVE_COPY_FILE_RANGE', cc.has_function('copy_file_range')) -config_host_data.set('HAVE_GETIFADDRS', cc.has_function('getifaddrs')) +config_host_data.set('HAVE_GETIFADDRS', cc.has_function('getifaddrs', dependencies: socket)) config_host_data.set('HAVE_GLIB_WITH_SLICE_ALLOCATOR', glib_has_gslice) config_host_data.set('HAVE_OPENPTY', cc.has_function('openpty', dependencies: util)) config_host_data.set('HAVE_STRCHRNUL', cc.has_function('strchrnul', prefix: osdep_prefix))