Commit 2fb7479e authored by Thomas Haller's avatar Thomas Haller

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.
parent 5c6a382d
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment