Split out of #37344.
/* Some unit tests for the helper functions in timesyncd. */
-#include "log.h"
-#include "macro.h"
#include "tests.h"
#include "timesyncd-conf.h"
#include "timesyncd-manager.h"
/* SPDX-License-Identifier: LGPL-2.1-or-later */
-#include <sys/capability.h>
-
#include "sd-bus.h"
-#include "alloc-util.h"
#include "bus-get-properties.h"
-#include "bus-internal.h"
#include "bus-log-control-api.h"
+#include "bus-object.h"
#include "bus-polkit.h"
-#include "bus-protocol.h"
#include "bus-util.h"
#include "dns-domain.h"
#include "in-addr-util.h"
#include "log.h"
-#include "macro.h"
#include "strv.h"
#include "time-util.h"
#include "timesyncd-bus.h"
#include "timesyncd-manager.h"
#include "timesyncd-server.h"
-#include "user-util.h"
static int property_get_servers(
sd_bus *bus,
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
-#include "bus-object.h"
-
-typedef struct Manager Manager;
+#include "timesyncd-forward.h"
extern const BusObjectImplementation manager_object;
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include "alloc-util.h"
-#include "constants.h"
+#include "conf-parser.h"
#include "dns-domain.h"
#include "extract-word.h"
+#include "log.h"
#include "string-util.h"
#include "timesyncd-conf.h"
#include "timesyncd-manager.h"
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
-#include "conf-parser.h"
-#include "timesyncd-server.h"
-
-typedef struct Manager Manager;
+#include "timesyncd-forward.h"
const struct ConfigPerfItem* timesyncd_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
--- /dev/null
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#pragma once
+
+#include "conf-parser-forward.h" /* IWYU pragma: export */
+#include "forward.h" /* IWYU pragma: export */
+
+typedef enum ServerType ServerType;
+
+typedef struct Manager Manager;
+typedef struct ServerAddress ServerAddress;
+typedef struct ServerName ServerName;
/* SPDX-License-Identifier: LGPL-2.1-or-later */
-#include <errno.h>
#include <math.h>
+#include <netdb.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <resolv.h>
-#include <stdlib.h>
-#include <sys/timerfd.h>
-#include <sys/timex.h>
-#include <sys/types.h>
+#include "sd-bus.h"
#include "sd-daemon.h"
#include "sd-messages.h"
+#include "sd-network.h"
#include "alloc-util.h"
-#include "bus-polkit.h"
#include "clock-util.h"
#include "common-signal.h"
#include "dns-domain.h"
+#include "errno-util.h"
#include "event-util.h"
#include "fd-util.h"
#include "format-util.h"
#include "fs-util.h"
+#include "hashmap.h"
#include "list.h"
#include "log.h"
#include "logarithm.h"
#include "string-util.h"
#include "strv.h"
#include "time-util.h"
-#include "timesyncd-conf.h"
#include "timesyncd-manager.h"
#include "timesyncd-server.h"
-#include "user-util.h"
#ifndef ADJ_SETOFFSET
#define ADJ_SETOFFSET 0x0100 /* add 'time' to current time */
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
-#include <sys/timex.h>
-
-#include "sd-bus.h"
-#include "sd-event.h"
-#include "sd-network.h"
-#include "sd-resolve.h"
-
-#include "hashmap.h"
#include "list.h"
#include "ratelimit.h"
#include "time-util.h"
+#include "timesyncd-forward.h"
#include "timesyncd-ntp-message.h"
-typedef enum ServerType ServerType;
-typedef struct ServerAddress ServerAddress;
-typedef struct ServerName ServerName;
-
/*
* "A client MUST NOT under any conditions use a poll interval less
* than 15 seconds."
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
-#include "macro.h"
#include "sparse-endian.h"
+#include "timesyncd-forward.h"
/* NTP protocol, packet header */
#define NTP_LEAP_PLUSSEC 1
#include "list.h"
#include "socket-util.h"
-
-typedef struct Manager Manager;
-typedef struct ServerAddress ServerAddress;
-typedef struct ServerName ServerName;
+#include "timesyncd-forward.h"
typedef enum ServerType {
SERVER_SYSTEM,
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <sys/stat.h>
-#include <sys/types.h>
-#include "sd-daemon.h"
#include "sd-event.h"
#include "sd-messages.h"
#include "bus-log-control-api.h"
+#include "bus-object.h"
#include "capability-util.h"
#include "clock-util.h"
#include "daemon-util.h"
+#include "errno-util.h"
#include "fd-util.h"
+#include "format-util.h"
#include "fs-util.h"
+#include "log.h"
#include "main-func.h"
#include "mkdir-label.h"
#include "network-util.h"
#include "process-util.h"
#include "service-util.h"
-#include "signal-util.h"
#include "timesyncd-bus.h"
#include "timesyncd-conf.h"
#include "timesyncd-manager.h"
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/* systemd service to wait until kernel realtime clock is synchronized */
-#include <errno.h>
-#include <stdbool.h>
#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include <sys/inotify.h>
-#include <sys/timerfd.h>
#include <sys/timex.h>
#include <unistd.h>
#include "errno-util.h"
#include "fd-util.h"
#include "inotify-util.h"
+#include "log.h"
#include "main-func.h"
-#include "signal-util.h"
#include "time-util.h"
typedef struct ClockState {