diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2018-02-16 16:05:31 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2018-02-16 16:09:50 +0100 |
commit | 9daa9346e2bfca4aa8ef6c459cf9ad8ccf81a8c9 (patch) | |
tree | 283951367f6f614b9ec78a6ddcf510e3dfb57a95 | |
parent | 0999ebdf6d795a84e2afbc13282b400fbd6fd4b5 (diff) | |
download | NetworkManager-9daa9346e2bfca4aa8ef6c459cf9ad8ccf81a8c9.tar.gz |
build: disable -Wgnu-variable-sized-type-not-at-end for systemd code
clang 5.0.1 complains:
src/systemd/src/libsystemd-network/dhcp6-option.c:40:28: error:
field 'option' with variable sized type 'struct DHCP6Option' not at
the end of a struct or class is a GNU extension
[-Werror,-Wgnu-variable-sized-type-not-at-end]
struct DHCP6Option option;
^
systemd disables this warning too.
-rw-r--r-- | Makefile.am | 1 | ||||
-rw-r--r-- | configure.ac | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index 7688695eec..c19acb2730 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1225,6 +1225,7 @@ src_libsystemd_nm_la_cppflags = \ -I$(srcdir)/src/systemd/src/shared \ -I$(srcdir)/src/systemd/src/libsystemd-network \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD \ + $(LIBSYSTEMD_NM_CFLAGS) \ $(GLIB_CFLAGS) \ $(CODE_COVERAGE_CFLAGS) diff --git a/configure.ac b/configure.ac index 3fd4090a7e..7c6e62007e 100644 --- a/configure.ac +++ b/configure.ac @@ -1097,6 +1097,9 @@ fi NM_COMPILER_WARNINGS(CFLAGS, ${more_warnings_default}) +NM_COMPILER_FLAG(LIBSYSTEMD_NM_CFLAGS, "-Wno-gnu-variable-sized-type-not-at-end") +AC_SUBST(LIBSYSTEMD_NM_CFLAGS) + CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\ -fno-strict-aliasing \ ]) |