summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/grp-machine/libmachine-core/src/machine-dbus.c2
-rw-r--r--src/grp-network/libnetworkd-core/networkd-manager.c2
-rw-r--r--src/grp-network/networkctl/networkctl.c2
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-query.c2
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-synthesize.c2
-rw-r--r--src/libsystemd-shared/Makefile1
-rw-r--r--src/libsystemd-shared/include/systemd-shared/local-addresses.h (renamed from src/libsystemd/src/sd-netlink/local-addresses.h)0
-rw-r--r--src/libsystemd-shared/src/Makefile2
-rw-r--r--src/libsystemd-shared/src/local-addresses.c (renamed from src/libsystemd/src/sd-netlink/local-addresses.c)3
-rw-r--r--src/libsystemd-shared/test/Makefile34
-rw-r--r--src/libsystemd-shared/test/test-local-addresses.c (renamed from src/libsystemd/src/sd-netlink/test-local-addresses.c)3
-rw-r--r--src/libsystemd/Makefile1
-rw-r--r--src/libsystemd/src/Makefile2
-rw-r--r--src/libsystemd/src/test.mk6
-rw-r--r--src/nss-myhostname/Makefile2
-rw-r--r--src/nss-myhostname/nss-myhostname.c2
-rw-r--r--src/systemd-nspawn/nspawn-expose-ports.c2
-rw-r--r--src/test/test-nss.c2
18 files changed, 48 insertions, 22 deletions
diff --git a/src/grp-machine/libmachine-core/src/machine-dbus.c b/src/grp-machine/libmachine-core/src/machine-dbus.c
index b7363054b3..89991a798f 100644
--- a/src/grp-machine/libmachine-core/src/machine-dbus.c
+++ b/src/grp-machine/libmachine-core/src/machine-dbus.c
@@ -33,7 +33,6 @@
#include "sd-bus/bus-common-errors.h"
#include "sd-bus/bus-internal.h"
#include "sd-bus/bus-util.h"
-#include "sd-netlink/local-addresses.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/bus-label.h"
#include "systemd-basic/copy.h"
@@ -50,6 +49,7 @@
#include "systemd-basic/strv.h"
#include "systemd-basic/terminal-util.h"
#include "systemd-basic/user-util.h"
+#include "systemd-shared/local-addresses.h"
static int property_get_state(
sd_bus *bus,
diff --git a/src/grp-network/libnetworkd-core/networkd-manager.c b/src/grp-network/libnetworkd-core/networkd-manager.c
index d7d149ebb5..1babedcce7 100644
--- a/src/grp-network/libnetworkd-core/networkd-manager.c
+++ b/src/grp-network/libnetworkd-core/networkd-manager.c
@@ -25,7 +25,6 @@
#include "libudev-private.h"
#include "sd-bus/bus-util.h"
-#include "sd-netlink/local-addresses.h"
#include "sd-netlink/netlink-util.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/def.h"
@@ -37,6 +36,7 @@
#include "systemd-basic/virt.h"
#include "systemd-shared/conf-parser.h"
#include "systemd-shared/dns-domain.h"
+#include "systemd-shared/local-addresses.h"
#include "systemd-shared/udev-util.h"
#include "systemd-staging/sd-netlink.h"
diff --git a/src/grp-network/networkctl/networkctl.c b/src/grp-network/networkctl/networkctl.c
index bc95b4fb24..fd75f1aed8 100644
--- a/src/grp-network/networkctl/networkctl.c
+++ b/src/grp-network/networkctl/networkctl.c
@@ -23,7 +23,6 @@
#include "sd-device/device-util.h"
#include "sd-hwdb/hwdb-util.h"
-#include "sd-netlink/local-addresses.h"
#include "sd-netlink/netlink-util.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/arphrd-list.h"
@@ -42,6 +41,7 @@
#include "systemd-basic/util.h"
#include "systemd-basic/verbs.h"
#include "systemd-network/sd-lldp.h"
+#include "systemd-shared/local-addresses.h"
#include "systemd-shared/pager.h"
#include "systemd-staging/sd-device.h"
#include "systemd-staging/sd-hwdb.h"
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-query.c b/src/grp-resolve/systemd-resolved/resolved-dns-query.c
index 2193dc5bcf..75229d5b1e 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-query.c
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-query.c
@@ -18,11 +18,11 @@
***/
#include "basic-dns/dns-type.h"
-#include "sd-netlink/local-addresses.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/hostname-util.h"
#include "systemd-basic/string-util.h"
#include "systemd-shared/dns-domain.h"
+#include "systemd-shared/local-addresses.h"
#include "resolved-dns-query.h"
#include "resolved-dns-synthesize.h"
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-synthesize.c b/src/grp-resolve/systemd-resolved/resolved-dns-synthesize.c
index 53d1940d9e..84cf632244 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-synthesize.c
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-synthesize.c
@@ -17,9 +17,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-netlink/local-addresses.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/hostname-util.h"
+#include "systemd-shared/local-addresses.h"
#include "resolved-dns-synthesize.h"
diff --git a/src/libsystemd-shared/Makefile b/src/libsystemd-shared/Makefile
index 369b265ff7..8ba25db413 100644
--- a/src/libsystemd-shared/Makefile
+++ b/src/libsystemd-shared/Makefile
@@ -24,5 +24,6 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
nested.subdirs += src
+nested.subdirs += test
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libsystemd/src/sd-netlink/local-addresses.h b/src/libsystemd-shared/include/systemd-shared/local-addresses.h
index f1e91ccfd2..f1e91ccfd2 100644
--- a/src/libsystemd/src/sd-netlink/local-addresses.h
+++ b/src/libsystemd-shared/include/systemd-shared/local-addresses.h
diff --git a/src/libsystemd-shared/src/Makefile b/src/libsystemd-shared/src/Makefile
index 9cbcb79e4a..c718f18269 100644
--- a/src/libsystemd-shared/src/Makefile
+++ b/src/libsystemd-shared/src/Makefile
@@ -27,6 +27,8 @@ rootlibexec_LTLIBRARIES += \
libsystemd-shared.la
libsystemd_shared_la_SOURCES = \
+ src/libsystemd/sd-netlink/local-addresses.h \
+ src/libsystemd/sd-netlink/local-addresses.c \
src/shared/output-mode.h \
src/shared/output-mode.c \
src/shared/gpt.h \
diff --git a/src/libsystemd/src/sd-netlink/local-addresses.c b/src/libsystemd-shared/src/local-addresses.c
index 6d6ee9c504..d417320ad3 100644
--- a/src/libsystemd/src/sd-netlink/local-addresses.c
+++ b/src/libsystemd-shared/src/local-addresses.c
@@ -20,10 +20,9 @@
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/macro.h"
+#include "systemd-shared/local-addresses.h"
#include "systemd-staging/sd-netlink.h"
-#include "local-addresses.h"
-
static int address_compare(const void *_a, const void *_b) {
const struct local_address *a = _a, *b = _b;
diff --git a/src/libsystemd-shared/test/Makefile b/src/libsystemd-shared/test/Makefile
new file mode 100644
index 0000000000..131958f906
--- /dev/null
+++ b/src/libsystemd-shared/test/Makefile
@@ -0,0 +1,34 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+tests += test-local-addreses
+
+test_local_addresses_SOURCES = \
+ src/libsystemd/sd-netlink/test-local-addresses.c
+
+test_local_addresses_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libsystemd/src/sd-netlink/test-local-addresses.c b/src/libsystemd-shared/test/test-local-addresses.c
index b08cac9907..d639fd019b 100644
--- a/src/libsystemd/src/sd-netlink/test-local-addresses.c
+++ b/src/libsystemd-shared/test/test-local-addresses.c
@@ -20,8 +20,7 @@
#include "systemd-basic/af-list.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/in-addr-util.h"
-
-#include "local-addresses.h"
+#include "systemd-shared/local-addresses.h"
static void print_local_addresses(struct local_address *a, unsigned n) {
unsigned i;
diff --git a/src/libsystemd/Makefile b/src/libsystemd/Makefile
index e85ef4a778..4e9d06c4f0 100644
--- a/src/libsystemd/Makefile
+++ b/src/libsystemd/Makefile
@@ -79,7 +79,6 @@ tests += \
test-bus-track \
test-event \
test-netlink \
- test-local-addresses \
test-resolve
_pkginclude_HEADERS += \
diff --git a/src/libsystemd/src/Makefile b/src/libsystemd/src/Makefile
index 5907b378a4..49480d80c4 100644
--- a/src/libsystemd/src/Makefile
+++ b/src/libsystemd/src/Makefile
@@ -91,8 +91,6 @@ _libsystemd_internal_la_SOURCES = \
src/libsystemd/sd-netlink/netlink-types.c \
src/libsystemd/sd-netlink/netlink-util.h \
src/libsystemd/sd-netlink/netlink-util.c \
- src/libsystemd/sd-netlink/local-addresses.h \
- src/libsystemd/sd-netlink/local-addresses.c \
src/libsystemd/sd-id128/sd-id128.c \
src/libsystemd/sd-id128/id128-util.h \
src/libsystemd/sd-id128/id128-util.c \
diff --git a/src/libsystemd/src/test.mk b/src/libsystemd/src/test.mk
index a4d107ba6b..ffaff5c889 100644
--- a/src/libsystemd/src/test.mk
+++ b/src/libsystemd/src/test.mk
@@ -146,12 +146,6 @@ test_netlink_SOURCES = \
test_netlink_LDADD = \
libsystemd-shared.la
-test_local_addresses_SOURCES = \
- src/libsystemd/sd-netlink/test-local-addresses.c
-
-test_local_addresses_LDADD = \
- libsystemd-shared.la
-
test_resolve_SOURCES = \
src/libsystemd/sd-resolve/test-resolve.c
diff --git a/src/nss-myhostname/Makefile b/src/nss-myhostname/Makefile
index 3f87158794..172758048b 100644
--- a/src/nss-myhostname/Makefile
+++ b/src/nss-myhostname/Makefile
@@ -37,7 +37,7 @@ libnss_myhostname_la_LDFLAGS = \
-Wl,--version-script=$(srcdir)/nss-myhostname.sym
libnss_myhostname_la_LIBADD = \
- libsystemd-internal.la \
+ libsystemd-shared.la \
libsystemd-basic.la
rootlib_LTLIBRARIES += \
diff --git a/src/nss-myhostname/nss-myhostname.c b/src/nss-myhostname/nss-myhostname.c
index 862ad2fcb5..c8858a00d2 100644
--- a/src/nss-myhostname/nss-myhostname.c
+++ b/src/nss-myhostname/nss-myhostname.c
@@ -24,7 +24,6 @@
#include <stdlib.h>
#include <string.h>
-#include "sd-netlink/local-addresses.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/hostname-util.h"
#include "systemd-basic/macro.h"
@@ -32,6 +31,7 @@
#include "systemd-basic/signal-util.h"
#include "systemd-basic/string-util.h"
#include "systemd-basic/util.h"
+#include "systemd-shared/local-addresses.h"
/* We use 127.0.0.2 as IPv4 address. This has the advantage over
* 127.0.0.1 that it can be translated back to the local hostname. For
diff --git a/src/systemd-nspawn/nspawn-expose-ports.c b/src/systemd-nspawn/nspawn-expose-ports.c
index efdc845476..b5c4942907 100644
--- a/src/systemd-nspawn/nspawn-expose-ports.c
+++ b/src/systemd-nspawn/nspawn-expose-ports.c
@@ -17,7 +17,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-netlink/local-addresses.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/fd-util.h"
#include "systemd-basic/in-addr-util.h"
@@ -26,6 +25,7 @@
#include "systemd-basic/string-util.h"
#include "systemd-basic/util.h"
#include "systemd-firewall/firewall-util.h"
+#include "systemd-shared/local-addresses.h"
#include "systemd-staging/sd-netlink.h"
#include "nspawn-expose-ports.h"
diff --git a/src/test/test-nss.c b/src/test/test-nss.c
index 1ccd0def3f..9826e8982c 100644
--- a/src/test/test-nss.c
+++ b/src/test/test-nss.c
@@ -21,7 +21,6 @@
#include <net/if.h>
#include <stdlib.h>
-#include "sd-netlink/local-addresses.h"
#include "systemd-basic/af-list.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/errno-list.h"
@@ -34,6 +33,7 @@
#include "systemd-basic/stdio-util.h"
#include "systemd-basic/string-util.h"
#include "systemd-basic/strv.h"
+#include "systemd-shared/local-addresses.h"
static const char* nss_status_to_string(enum nss_status status, char *buf, size_t buf_len) {
switch (status) {