mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-05 08:00:15 +01:00
macros: add _nm_fallthrough macro
Systemd introduced a _fallthrough_ macro in https://github.com/systemd/systemd/pull/7389. There might still be some issue with it, but as I am going to re-import the latest systemd code, we get them too. We need it, because "shared/nm-utils/siphash24.c" will use it too, and that source file does not include the other systemd macros. So, we will need to re-define it.
This commit is contained in:
parent
5c6a382d4d
commit
2fb7479e82
1 changed files with 6 additions and 0 deletions
|
|
@ -35,6 +35,12 @@
|
|||
#define _nm_alignof(type) __alignof (type)
|
||||
#define _nm_alignas(type) _nm_align (_nm_alignof (type))
|
||||
|
||||
#if __GNUC__ >= 7
|
||||
#define _nm_fallthrough __attribute__ ((fallthrough))
|
||||
#else
|
||||
#define _nm_fallthrough
|
||||
#endif
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#ifdef thread_local
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue