diff options
author | Jakub Adam <jakub.adam@collabora.com> | 2019-02-19 11:21:07 +0100 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@ocrete.ca> | 2019-05-09 01:14:37 +0000 |
commit | 725f8af121231e14c72383c2f4ca58e1c340175d (patch) | |
tree | 680edf8dcfd556a670c18b05d9c7b690e86b8ae5 /agent/agent-priv.h | |
parent | 1faae8c83336eccb0fb3ddc7dd894bd36996d2fa (diff) | |
download | libnice-725f8af121231e14c72383c2f4ca58e1c340175d.tar.gz |
agent: G_GNUC_FALLTHROUGH macro for compatibility with older glib
Diffstat (limited to 'agent/agent-priv.h')
-rw-r--r-- | agent/agent-priv.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/agent/agent-priv.h b/agent/agent-priv.h index 91f73a3..ee1000e 100644 --- a/agent/agent-priv.h +++ b/agent/agent-priv.h @@ -328,4 +328,12 @@ void nice_debug (const char *fmt, ...) G_GNUC_PRINTF (1, 2); void nice_debug_verbose (const char *fmt, ...) G_GNUC_PRINTF (1, 2); #endif +#if !GLIB_CHECK_VERSION(2, 59, 0) +#if __GNUC__ > 6 +#define G_GNUC_FALLTHROUGH __attribute__((fallthrough)) +#else +#define G_GNUC_FALLTHROUGH +#endif /* __GNUC__ */ +#endif + #endif /*_NICE_AGENT_PRIV_H */ |