diff --git a/src/network/test-network-tables.c b/src/network/test-network-tables.c
index 475cac7527..b1d934a3c4 100644
--- a/src/network/test-network-tables.c
+++ b/src/network/test-network-tables.c
@@ -40,10 +40,16 @@ int main(int argc, char **argv) {
test_table(wol, WOL);
test_table(lldp_event, SD_LLDP_EVENT);
test_table(ndisc_event, SD_NDISC_EVENT);
+ test_table(dhcp_lease_server_type, SD_DHCP_LEASE_SERVER_TYPE);
test_table_sparse(ipvlan_mode, NETDEV_IPVLAN_MODE);
test_table_sparse(macvlan_mode, NETDEV_MACVLAN_MODE);
test_table_sparse(address_family, ADDRESS_FAMILY);
+ assert_cc(sizeof(sd_lldp_event) == sizeof(int64_t));
+ assert_cc(sizeof(sd_ndisc_event) == sizeof(int64_t));
+ assert_cc(sizeof(sd_dhcp_lease_server_type) == sizeof(int64_t));
+ assert_cc(sizeof(sd_genl_family) == sizeof(int64_t));
+
return EXIT_SUCCESS;
}
diff --git a/src/shared/wifi-util.c b/src/shared/wifi-util.c
index 2ac8846004..5caa95f3d2 100644
--- a/src/shared/wifi-util.c
+++ b/src/shared/wifi-util.c
@@ -42,7 +42,7 @@ int wifi_get_interface(sd_netlink *genl, int ifindex, enum nl80211_iftype *iftyp
if (r < 0)
return log_debug_errno(r, "Failed to determine genl family: %m");
if (family != SD_GENL_NL80211) {
- log_debug("Received message of unexpected genl family %u, ignoring.", family);
+ log_debug("Received message of unexpected genl family %" PRIi64 ", ignoring.", family);
goto nodata;
}
@@ -110,7 +110,7 @@ int wifi_get_station(sd_netlink *genl, int ifindex, struct ether_addr *bssid) {
if (r < 0)
return log_debug_errno(r, "Failed to determine genl family: %m");
if (family != SD_GENL_NL80211) {
- log_debug("Received message of unexpected genl family %u, ignoring.", family);
+ log_debug("Received message of unexpected genl family %" PRIi64 ", ignoring.", family);
goto nodata;
}
diff --git a/src/systemd/sd-dhcp-lease.h b/src/systemd/sd-dhcp-lease.h
index 2c6c0a981d..ca2da7920d 100644
--- a/src/systemd/sd-dhcp-lease.h
+++ b/src/systemd/sd-dhcp-lease.h
@@ -43,6 +43,7 @@ typedef enum sd_dhcp_lease_server_type {
SD_DHCP_LEASE_LPR,
_SD_DHCP_LEASE_SERVER_TYPE_MAX,
_SD_DHCP_LEASE_SERVER_TYPE_INVALID = -EINVAL,
+ _SD_ENUM_FORCE_S64(DHCP_LEASE_SERVER_TYPE),
} sd_dhcp_lease_server_type;
int sd_dhcp_lease_get_address(sd_dhcp_lease *lease, struct in_addr *addr);
diff --git a/src/systemd/sd-lldp.h b/src/systemd/sd-lldp.h
index 296a8201a2..88652bc2c6 100644
--- a/src/systemd/sd-lldp.h
+++ b/src/systemd/sd-lldp.h
@@ -129,6 +129,7 @@ typedef enum sd_lldp_event {
SD_LLDP_EVENT_REFRESHED,
_SD_LLDP_EVENT_MAX,
_SD_LLDP_EVENT_INVALID = -EINVAL,
+ _SD_ENUM_FORCE_S64(LLDP_EVENT),
} sd_lldp_event;
typedef void (*sd_lldp_callback_t)(sd_lldp *lldp, sd_lldp_event event, sd_lldp_neighbor *n, void *userdata);
diff --git a/src/systemd/sd-ndisc.h b/src/systemd/sd-ndisc.h
index f96bfc39ea..22e97d8ff7 100644
--- a/src/systemd/sd-ndisc.h
+++ b/src/systemd/sd-ndisc.h
@@ -60,6 +60,7 @@ typedef enum sd_ndisc_event {
SD_NDISC_EVENT_ROUTER,
_SD_NDISC_EVENT_MAX,
_SD_NDISC_EVENT_INVALID = -EINVAL,
+ _SD_ENUM_FORCE_S64(NDISC_EVENT),
} sd_ndisc_event;
typedef void (*sd_ndisc_callback_t)(sd_ndisc *nd, sd_ndisc_event event, sd_ndisc_router *rt, void *userdata);
diff --git a/src/systemd/sd-netlink.h b/src/systemd/sd-netlink.h
index 13b00d6a5b..18a88a36be 100644
--- a/src/systemd/sd-netlink.h
+++ b/src/systemd/sd-netlink.h
@@ -17,6 +17,7 @@
along with systemd; If not, see .
***/
+#include
#include
#include
#include
@@ -34,7 +35,7 @@ typedef struct sd_genl_socket sd_genl_socket;
typedef struct sd_netlink_message sd_netlink_message;
typedef struct sd_netlink_slot sd_netlink_slot;
-typedef enum sd_gen_family {
+typedef enum sd_genl_family {
SD_GENL_ERROR,
SD_GENL_DONE,
SD_GENL_ID_CTRL,
@@ -43,6 +44,9 @@ typedef enum sd_gen_family {
SD_GENL_L2TP,
SD_GENL_MACSEC,
SD_GENL_NL80211,
+ _SD_GENL_FAMILY_MAX,
+ _SD_GENL_FAMILY_INVALID = -EINVAL,
+ _SD_ENUM_FORCE_S64(GENL_FAMILY)
} sd_genl_family;
/* callback */