mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-04 04:50:30 +01:00
core: add compatibility wrapper for g_test_skip() to nm-glib-compat.h
Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
284ef00d16
commit
ed868a388b
6 changed files with 15 additions and 6 deletions
|
|
@ -96,4 +96,18 @@ g_type_ensure (GType type)
|
|||
#define g_test_initialized() (g_test_config_vars->test_initialized)
|
||||
#endif
|
||||
|
||||
/* g_test_skip() is only available since glib 2.38. Add a compatibility wrapper. */
|
||||
inline static void
|
||||
__nmtst_g_test_skip (const gchar *msg)
|
||||
{
|
||||
#if GLIB_CHECK_VERSION (2, 38, 0)
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
g_test_skip (msg);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
#else
|
||||
g_debug ("%s", msg);
|
||||
#endif
|
||||
}
|
||||
#define g_test_skip __nmtst_g_test_skip
|
||||
|
||||
#endif /* NM_GLIB_COMPAT_H */
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#include <errno.h>
|
||||
|
||||
#include "nm-utils.h"
|
||||
#include "nm-glib-compat.h"
|
||||
|
||||
|
||||
struct __nmtst_internal
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@
|
|||
#include "nm-utils.h"
|
||||
#include "nm-util-private.h"
|
||||
#include "nm-dbus-glib-types.h"
|
||||
#include "nm-glib-compat.h"
|
||||
|
||||
#include "nm-test-utils.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@
|
|||
#include <nm-util-private.h>
|
||||
|
||||
#include "NetworkManagerUtils.h"
|
||||
#include "nm-glib-compat.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "reader.h"
|
||||
|
|
|
|||
|
|
@ -41,8 +41,6 @@
|
|||
#include <nm-setting-8021x.h>
|
||||
#include <nm-setting-infiniband.h>
|
||||
|
||||
#include "nm-glib-compat.h"
|
||||
|
||||
#include "reader.h"
|
||||
#include "writer.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@
|
|||
#include <nm-setting-ip4-config.h>
|
||||
#include <nm-setting-8021x.h>
|
||||
|
||||
#include "nm-glib-compat.h"
|
||||
|
||||
#include "nm-supplicant-config.h"
|
||||
#include "nm-supplicant-settings-verify.h"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue