From f1ccd9fe71d42a3d55bc26fb5aa034623d8747cb Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 31 Jul 2020 10:41:40 +0200 Subject: [PATCH] dhcp/nettools: don't use systemd header "hostname-util.h" in "nm-dhcp-nettools.c" We must not use systemd API directly, except via the adapter headers that expose a subset of the API. In this case, we already have our own implementation. Use it. --- src/dhcp/nm-dhcp-nettools.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/dhcp/nm-dhcp-nettools.c b/src/dhcp/nm-dhcp-nettools.c index a8127236c7..8d7d021710 100644 --- a/src/dhcp/nm-dhcp-nettools.c +++ b/src/dhcp/nm-dhcp-nettools.c @@ -14,7 +14,6 @@ #include #include "nm-sd-adapt-shared.h" -#include "hostname-util.h" #include "nm-glib-aux/nm-dedup-multi.h" #include "nm-std-aux/unaligned.h" @@ -747,7 +746,7 @@ lease_parse_hostname (NDhcp4ClientLease *lease, str = g_string_new_len ((char *)data, n_data); - if (is_localhost(str->str)) + if (nm_utils_is_localhost (str->str)) return; nm_dhcp_option_add_option (options, @@ -778,7 +777,7 @@ lease_parse_domainname (NDhcp4ClientLease *lease, nm_gstring_prepare (&str); for (char **d = domains; *d; d++) { - if (is_localhost(*d)) + if (nm_utils_is_localhost (*d)) return; g_string_append (nm_gstring_add_space_delimiter (str), *d);