From 733cbd00b0190bb7d16d12e001ddf7817754e46d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 23 Jul 2019 14:22:06 +0200 Subject: [PATCH] netlink: move local-addresses.[ch] to src/shared This code is not part of the public API of sd-netlink, nor used by it internally and hence should not be in the sd-netlink directory. Also, move the test case for it to src/test/. --- meson.build | 1 + src/libsystemd/meson.build | 2 -- src/{libsystemd/sd-netlink => shared}/local-addresses.c | 0 src/{libsystemd/sd-netlink => shared}/local-addresses.h | 0 src/shared/meson.build | 2 ++ src/test/meson.build | 8 ++++---- .../sd-netlink => test}/test-local-addresses.c | 0 7 files changed, 7 insertions(+), 6 deletions(-) rename src/{libsystemd/sd-netlink => shared}/local-addresses.c (100%) rename src/{libsystemd/sd-netlink => shared}/local-addresses.h (100%) rename src/{libsystemd/sd-netlink => test}/test-local-addresses.c (100%) diff --git a/meson.build b/meson.build index 76b3d53391..e5ceb1e169 100644 --- a/meson.build +++ b/meson.build @@ -1540,6 +1540,7 @@ foreach tuple : [['myhostname', 'ENABLE_NSS_MYHOSTNAME'], '-shared', '-Wl,--version-script=' + version_script_arg], link_with : [libsystemd_static, + libshared_static, libbasic], dependencies : [threads, librt], diff --git a/src/libsystemd/meson.build b/src/libsystemd/meson.build index 67add387e6..77fe6e780f 100644 --- a/src/libsystemd/meson.build +++ b/src/libsystemd/meson.build @@ -71,8 +71,6 @@ libsystemd_sources = files(''' sd-hwdb/hwdb-util.h sd-hwdb/sd-hwdb.c sd-netlink/generic-netlink.c - sd-netlink/local-addresses.c - sd-netlink/local-addresses.h sd-netlink/netlink-internal.h sd-netlink/netlink-message.c sd-netlink/netlink-slot.c diff --git a/src/libsystemd/sd-netlink/local-addresses.c b/src/shared/local-addresses.c similarity index 100% rename from src/libsystemd/sd-netlink/local-addresses.c rename to src/shared/local-addresses.c diff --git a/src/libsystemd/sd-netlink/local-addresses.h b/src/shared/local-addresses.h similarity index 100% rename from src/libsystemd/sd-netlink/local-addresses.h rename to src/shared/local-addresses.h diff --git a/src/shared/meson.build b/src/shared/meson.build index ca24d15eab..ca1a5547c4 100644 --- a/src/shared/meson.build +++ b/src/shared/meson.build @@ -109,6 +109,8 @@ shared_sources = files(''' linux/bpf_insn.h linux/dm-ioctl.h linux/ethtool.h + local-addresses.c + local-addresses.h lockfile-util.c lockfile-util.h log-link.h diff --git a/src/test/meson.build b/src/test/meson.build index ddc04dda65..e337e50146 100644 --- a/src/test/meson.build +++ b/src/test/meson.build @@ -754,6 +754,10 @@ tests += [ [['src/test/test-sd-hwdb.c'], [], []], + + [['src/test/test-local-addresses.c'], + [], + []], ] ############################################################ @@ -964,10 +968,6 @@ tests += [ [], []], - [['src/libsystemd/sd-netlink/test-local-addresses.c'], - [], - []], - [['src/libsystemd/sd-resolve/test-resolve.c'], [], [threads], diff --git a/src/libsystemd/sd-netlink/test-local-addresses.c b/src/test/test-local-addresses.c similarity index 100% rename from src/libsystemd/sd-netlink/test-local-addresses.c rename to src/test/test-local-addresses.c