mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
error-report: replace deprecated g_get_current_time() with glib >= 2.62
According to GLib API: g_get_current_time has been deprecated since version 2.62 and should not be used in newly-written code. GTimeVal is not year-2038-safe. Use g_get_real_time() instead. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220323155743.1585078-14-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
6e9396696f
commit
73dab893b5
2 changed files with 24 additions and 3 deletions
|
@ -145,6 +145,16 @@ qemu_g_test_slow(void)
|
|||
#define g_test_thorough() qemu_g_test_slow()
|
||||
#define g_test_quick() (!qemu_g_test_slow())
|
||||
|
||||
#if GLIB_CHECK_VERSION(2,62,0)
|
||||
static inline gchar *
|
||||
g_date_time_format_iso8601_compat(GDateTime *datetime)
|
||||
{
|
||||
return g_date_time_format_iso8601(datetime);
|
||||
}
|
||||
|
||||
#define g_date_time_format_iso8601 g_date_time_format_iso8601_compat
|
||||
#endif
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue