@@ -948,7 +948,9 @@ have_xen_pci_passthrough = get_option('xen_pci_passthrough') \
948948################
949949
950950# When bumping glib minimum version, please check also whether to increase
951- # the _WIN32_WINNT setting in osdep.h according to the value from glib
951+ # the _WIN32_WINNT setting in osdep.h according to the value from glib.
952+ # You should also check if any of the glib.version() checks
953+ # below can also be removed.
952954glib_req_ver = ' >=2.66.0'
953955glib_pc = dependency (' glib-2.0' , version : glib_req_ver, required : true ,
954956 method : ' pkg-config' )
@@ -998,6 +1000,9 @@ glib = declare_dependency(dependencies: [glib_pc, gmodule],
9981000# TODO: remove this check and the corresponding workaround (qtree) when
9991001# the minimum supported glib is >= 2.75.3
10001002glib_has_gslice = glib.version().version_compare(' <2.75.3' )
1003+ # Check whether glib has the aligned_alloc family of functions.
1004+ # <https://docs.gtk.org/glib/func.aligned_alloc.html>
1005+ glib_has_aligned_alloc = glib.version().version_compare(' >=2.72.0' )
10011006
10021007# override glib dep to include the above refinements
10031008meson .override_dependency(' glib-2.0' , glib)
@@ -2529,6 +2534,7 @@ config_host_data.set('CONFIG_TIMERFD', cc.has_function('timerfd_create'))
25292534config_host_data.set(' HAVE_COPY_FILE_RANGE' , cc.has_function(' copy_file_range' ))
25302535config_host_data.set(' HAVE_GETIFADDRS' , cc.has_function(' getifaddrs' ))
25312536config_host_data.set(' HAVE_GLIB_WITH_SLICE_ALLOCATOR' , glib_has_gslice)
2537+ config_host_data.set(' HAVE_GLIB_WITH_ALIGNED_ALLOC' , glib_has_aligned_alloc)
25322538config_host_data.set(' HAVE_OPENPTY' , cc.has_function(' openpty' , dependencies : util))
25332539config_host_data.set(' HAVE_STRCHRNUL' , cc.has_function(' strchrnul' ))
25342540config_host_data.set(' HAVE_SYSTEM_FUNCTION' , cc.has_function(' system' , prefix : ' #include <stdlib.h>' ))
0 commit comments