mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-06-19 11:18:28 +02:00
shared: redefine G_SOURCE_FUNC
G_SOURCE_FUNC has attribute GLIB_AVAILABLE_MACRO_IN_2_58, which means that the compiler will emit a warning when GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_58. We currently define GLIB_VERSION_MAX_ALLOWED as GLIB_VERSION_2_40. Redefine the macro to fix the following build error when using glib >= 2.63.5 (the version in which the attribute was added): CC shared/nm-glib-aux/libnm_glib_aux_la-nm-shared-utils.lo shared/nm-glib-aux/nm-shared-utils.c: In function ‘nm_g_unix_fd_source_new’: shared/nm-glib-aux/nm-shared-utils.c:3679:13: error: Not available before [-Werror] 3679 | g_source_set_callback (source, G_SOURCE_FUNC (source_func), user_data, destroy_notify); Fixes:9c5741ccd2('shared/nm-glib: add compat implementation for G_SOURCE_FUNC()') (cherry picked from commit7f801685b2)
This commit is contained in:
parent
8d900b5bec
commit
047ab7f4af
1 changed files with 2 additions and 2 deletions
|
|
@ -569,9 +569,9 @@ _nm_g_value_unset (GValue *value)
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
#if !GLIB_CHECK_VERSION (2, 57, 2)
|
||||
/* G_SOURCE_FUNC was added in 2.57.2. */
|
||||
#undef G_SOURCE_FUNC
|
||||
#define G_SOURCE_FUNC(f) ((GSourceFunc) (void (*)(void)) (f))
|
||||
#endif
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue