From 8a98f11ed0cde548da21dd820fc3f74dc6119f4d Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Sun, 9 Feb 2020 07:18:35 -0500 Subject: [PATCH] network: Make address_hash_ops available outside of networkd-address.c In order to allow other parts of systemd-networkd to use sets/hashmaps of Address objects, the address_hash_ops structure needs to be made available to them. --- src/network/networkd-address.c | 2 +- src/network/networkd-address.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c index 88bafb4d20c..59775869b60 100644 --- a/src/network/networkd-address.c +++ b/src/network/networkd-address.c @@ -187,7 +187,7 @@ static int address_compare_func(const Address *a1, const Address *a2) { } } -DEFINE_PRIVATE_HASH_OPS(address_hash_ops, Address, address_hash_func, address_compare_func); +DEFINE_HASH_OPS(address_hash_ops, Address, address_hash_func, address_compare_func); bool address_equal(Address *a1, Address *a2) { if (a1 == a2) diff --git a/src/network/networkd-address.h b/src/network/networkd-address.h index 76a30a54bcd..6995c5c06e0 100644 --- a/src/network/networkd-address.h +++ b/src/network/networkd-address.h @@ -67,6 +67,8 @@ int configure_ipv4_duplicate_address_detection(Link *link, Address *address); DEFINE_NETWORK_SECTION_FUNCTIONS(Address, address_free); +extern const struct hash_ops address_hash_ops; + CONFIG_PARSER_PROTOTYPE(config_parse_address); CONFIG_PARSER_PROTOTYPE(config_parse_broadcast); CONFIG_PARSER_PROTOTYPE(config_parse_label); -- 2.47.3