build: don't add shared/nm-utils directory to include search path

All users are supposed to include files from nm-utils by fully specifying
the path. -I.*shared/nm-utils is wrong.

Only, systemd code likes to include "siphash24.h" directly. Instead of
adding "-Ishared/nm-utils" to the search path, add an intermediary
header to sd-adapt. Note, that in the meantime we anyway should rework
siphash24 to use shared/c-siphash instead.

This also fixes build for meson, which was broken recently.
This commit is contained in:
Thomas Haller 2018-05-30 11:13:41 +02:00
parent cdbd99c5d5
commit 82b088ab5f
4 changed files with 8 additions and 2 deletions

View file

@ -1258,7 +1258,6 @@ src_libsystemd_nm_la_cppflags = \
-I$(builddir)/libnm-core \
-I$(srcdir)/src \
-I$(srcdir)/src/systemd/sd-adapt \
-I$(srcdir)/shared/nm-utils \
-I$(srcdir)/src/systemd/src/systemd \
-I$(srcdir)/src/systemd/src/basic \
-I$(srcdir)/src/systemd/src/shared \
@ -1301,10 +1300,12 @@ src_libsystemd_nm_la_SOURCES = \
src/systemd/sd-adapt/procfs-util.h \
src/systemd/sd-adapt/raw-clone.h \
src/systemd/sd-adapt/sd-daemon.h \
src/systemd/sd-adapt/siphash24.h \
src/systemd/sd-adapt/stat-util.h \
src/systemd/sd-adapt/terminal-util.h \
src/systemd/sd-adapt/udev-util.h \
src/systemd/sd-adapt/udev.h \
src/systemd/sd-adapt/unaligned.h \
src/systemd/sd-adapt/user-util.h \
src/systemd/sd-adapt/virt.h \
src/systemd/src/basic/alloc-util.c \

View file

@ -64,7 +64,6 @@ shared_dep = declare_dependency(
include_directories: [
top_inc,
shared_inc,
include_directories('nm-utils')
],
dependencies: glib_dep
)

View file

@ -0,0 +1,3 @@
#pragma once
#include "nm-utils/siphash24.h"

View file

@ -0,0 +1,3 @@
#pragma once
#include "nm-utils/unaligned.h"