mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
util: always replace g_fsync usage with our wrapper
g_fsync was introduced in 2.63 which is newer than our minimum glib version. A future commit will introduce compile time checking of API versions to prevent accidental usage of APIs from glib newer than our min declared. To avoid triggering this warning, however, we need to ensure that we always use our wrapper function via glibcompat.c, which will disable the API version warnings. Reviewed-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
97c7f3ead4
commit
14c136443c
@ -55,6 +55,7 @@ vir_g_strdup_vprintf(const char *msg, va_list args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Drop when min glib >= 2.63.0 */
|
||||||
gint
|
gint
|
||||||
vir_g_fsync(gint fd)
|
vir_g_fsync(gint fd)
|
||||||
{
|
{
|
||||||
|
@ -32,6 +32,5 @@ gint vir_g_fsync(gint fd);
|
|||||||
# define g_strdup_vprintf vir_g_strdup_vprintf
|
# define g_strdup_vprintf vir_g_strdup_vprintf
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !GLIB_CHECK_VERSION(2, 63, 0)
|
#undef g_fsync
|
||||||
# define g_fsync vir_g_fsync
|
#define g_fsync vir_g_fsync
|
||||||
#endif
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user