Fixes: #3980
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
'c_std=gnu11',
'warning_level=2',
],
- meson_version : '>= 0.46',
+ meson_version : '>= 0.48',
)
liblxc_version = '4.0.0'
have = cc.has_function('openpty', prefix : '#include <pty.h>', args : '-D_GNU_SOURCE')
conf.set10('HAVE_OPENPTY', have)
+conf.set10('HAVE_COMPILER_ATTR_NONNULL', cc.has_function_attribute('nonnull'))
+conf.set10('HAVE_COMPILER_ATTR_RETURNS_NONNULL', cc.has_function_attribute('returns_nonnull'))
+
config_h = configure_file(
output : 'config.h',
configuration : conf)
* Ensure that we always use the systemd-guaranteed stable order when checking
* for the mountpoint.
*/
-__attribute__((returns_nonnull)) __attribute__((nonnull))
+#if HAVE_COMPILER_ATTR_NONNULL
+__attribute__((nonnull))
+#endif
+#if HAVE_COMPILER_ATTR_RETURNS_NONNULL
+__attribute__((returns_nonnull))
+#endif
static const char *stable_order(const char *controllers)
{
if (strequal(controllers, "cpuacct,cpu"))