/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
+#include <sys/stat.h>
+
#include "sd-event.h"
#include "sd-netlink.h"
#include "sd-network.h"
bool need_builtin_fallbacks:1;
bool read_resolv_conf:1;
- usec_t resolv_conf_mtime;
+ struct stat resolv_conf_stat;
DnsTrustAnchor trust_anchor;
#include "resolved-conf.h"
#include "resolved-dns-server.h"
#include "resolved-resolv-conf.h"
+#include "stat-util.h"
#include "string-util.h"
#include "strv.h"
#include "tmpfile-util-label.h"
}
/* Have we already seen the file? */
- if (timespec_load(&st.st_mtim) == m->resolv_conf_mtime)
+ if (stat_inode_unmodified(&st, &m->resolv_conf_stat))
return 0;
if (file_is_our_own(&st))
log_syntax(NULL, LOG_DEBUG, "/etc/resolv.conf", n, 0, "Ignoring resolv.conf line: %s", l);
}
- m->resolv_conf_mtime = timespec_load(&st.st_mtim);
+ m->resolv_conf_stat = st;
/* Flush out all servers and search domains that are still
* marked. Those are then ones that didn't appear in the new