tree-wide: Make sure all headers are standalone

Let's make sure all of our headers include everything they require.
This commit is contained in:
Daan De Meyer
2025-04-23 10:33:38 +02:00
parent 44de729cdc
commit 401a22bfc1
81 changed files with 128 additions and 27 deletions
+1
View File
@@ -2,6 +2,7 @@
#pragma once
#include <stdbool.h>
#include <stddef.h>
bool signature_is_single(const char *s, bool allow_dict_entry);
bool signature_is_pair(const char *s);
+2
View File
@@ -1,6 +1,8 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include <stdbool.h>
#include "sd-bus.h"
void bus_socket_setup(sd_bus *b);
+2
View File
@@ -1,5 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
typedef struct sd_bus_track sd_bus_track;
void bus_track_dispatch(sd_bus_track *track);
void bus_track_close(sd_bus_track *track);
+3 -1
View File
@@ -1,6 +1,8 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/* This is meant to be included in other files, hence no headers */
#include <stdbool.h>
#include "sd-bus-vtable.h"
struct context {
bool quit;
+1
View File
@@ -6,6 +6,7 @@
#include <sys/stat.h>
#include "journal-def.h"
#include "memory-util.h"
typedef struct MMapCache MMapCache;
typedef struct MMapFileDescriptor MMapFileDescriptor;
+4
View File
@@ -2,8 +2,12 @@
#pragma once
#include <stdbool.h>
#include "sd-json.h"
#include "macro.h"
/* This header should include all prototypes only the JSON parser itself and
* its tests need access to. Normal code consuming the JSON parser should not
* interface with this. */
+4
View File
@@ -1,8 +1,12 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include <stdbool.h>
#include "sd-netlink.h"
#include "netlink-internal.h"
int netlink_slot_allocate(
sd_netlink *nl,
bool floating,
+1 -1
View File
@@ -4,7 +4,7 @@
#include "sd-varlink.h"
#include "sd-varlink-idl.h"
#include "macro.h"
#include "memory-util.h"
int varlink_idl_parse(const char *text, unsigned *ret_line, unsigned *ret_column, sd_varlink_interface **ret);
sd_varlink_interface* varlink_interface_free(sd_varlink_interface *interface);