summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/network/networkd-manager.c2
-rw-r--r--src/network/networkd-manager.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c
index f172e0d865..2813fa1f28 100644
--- a/src/network/networkd-manager.c
+++ b/src/network/networkd-manager.c
@@ -604,7 +604,9 @@ int manager_new(Manager **ret, bool test_mode) {
.duid_product_uuid.type = DUID_TYPE_UUID,
.dhcp_server_persist_leases = true,
.ip_forwarding = { -1, -1, },
+#if HAVE_VMLINUX_H
.cgroup_fd = -EBADF,
+#endif
};
*ret = TAKE_PTR(m);
diff --git a/src/network/networkd-manager.h b/src/network/networkd-manager.h
index 9a310c2eab..05a86b6b58 100644
--- a/src/network/networkd-manager.h
+++ b/src/network/networkd-manager.h
@@ -122,12 +122,14 @@ struct Manager {
/* sysctl */
int ip_forwarding[2];
+#if HAVE_VMLINUX_H
Hashmap *sysctl_shadow;
sd_event_source *sysctl_event_source;
struct ring_buffer *sysctl_buffer;
struct sysctl_monitor_bpf *sysctl_skel;
struct bpf_link *sysctl_link;
int cgroup_fd;
+#endif
};
int manager_new(Manager **ret, bool test_mode);