summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorAndrew Deason2022-04-26 21:55:22 +0200
committerMarc-André Lureau2022-05-04 10:00:46 +0200
commit59e35c7b659dc5b02c3525f9a2fd422fbc4b1364 (patch)
treedfa0ee00235a1fcc9081925cde79144b8b8bad48 /meson.build
parentMerge tag 'misc-pull-request' of gitlab.com:marcandre.lureau/qemu into staging (diff)
downloadqemu-59e35c7b659dc5b02c3525f9a2fd422fbc4b1364.tar.gz
qemu-59e35c7b659dc5b02c3525f9a2fd422fbc4b1364.tar.xz
qemu-59e35c7b659dc5b02c3525f9a2fd422fbc4b1364.zip
qga/commands-posix: Use getifaddrs when available
Currently, commands-posix.c assumes that getifaddrs() is only available on Linux, and so the related guest agent command guest-network-get-interfaces is only implemented for #ifdef __linux__. This function does exist on other platforms, though, such as Solaris. So, add a meson check for getifaddrs(), and move the code for guest-network-get-interfaces to be built whenever getifaddrs() is available. The implementation for guest-network-get-interfaces still has some Linux-specific code, which is not fixed in this commit. This commit moves the relevant big chunks of code around without changing them, so a future commit can change the code in place. Signed-off-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Message-Id: <20220426195526.7699-2-adeason@sinenomine.net>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build1
1 files changed, 1 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 1fe7d257ff..c26aa442d4 100644
--- a/meson.build
+++ b/meson.build
@@ -1687,6 +1687,7 @@ config_host_data.set('CONFIG_SYNCFS', cc.has_function('syncfs'))
config_host_data.set('CONFIG_SYNC_FILE_RANGE', cc.has_function('sync_file_range'))
config_host_data.set('CONFIG_TIMERFD', cc.has_function('timerfd_create'))
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_OPENPTY', cc.has_function('openpty', dependencies: util))
config_host_data.set('HAVE_STRCHRNUL', cc.has_function('strchrnul'))
config_host_data.set('HAVE_SYSTEM_FUNCTION', cc.has_function('system', prefix: '#include <stdlib.h>'))