From: Vladimír Čunát Date: Tue, 4 Feb 2025 14:03:15 +0000 (+0100) Subject: daemon/lua: avoid depending on KNOT_EDNS_MAX_OPTION_CODE X-Git-Tag: v6.0.11~8^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=016692b2766ab9225a54ca1c0fda3e660a15a68c;p=thirdparty%2Fknot-resolver.git daemon/lua: avoid depending on KNOT_EDNS_MAX_OPTION_CODE We don't need to use the knot_edns_options_t type from lua, only there's a pointer in knot_pkt_t. Now libknot increased this length in v3.4.4, even without bumping SONAME, and it might happen again. This way we avoid kres-gen-33.lua depending on this length. --- diff --git a/daemon/lua/kres-gen-33.lua b/daemon/lua/kres-gen-33.lua index f37cc7c6a..8147af88f 100644 --- a/daemon/lua/kres-gen-33.lua +++ b/daemon/lua/kres-gen-33.lua @@ -61,10 +61,9 @@ typedef struct { struct kr_module; typedef char *(kr_prop_cb)(void *, struct kr_module *, const char *); typedef unsigned char knot_dname_storage_t[255]; + +typedef struct {} knot_edns_options_t; typedef struct knot_pkt knot_pkt_t; -typedef struct { - uint8_t *ptr[18]; -} knot_edns_options_t; typedef struct { knot_pkt_t *pkt; uint16_t pos; diff --git a/daemon/lua/kres-gen.sh b/daemon/lua/kres-gen.sh index eeb101d85..003886c52 100755 --- a/daemon/lua/kres-gen.sh +++ b/daemon/lua/kres-gen.sh @@ -113,10 +113,13 @@ typedef char *(kr_prop_cb)(void *, struct kr_module *, const char *); typedef unsigned char knot_dname_storage_t[255]; " +printf " +typedef struct {} knot_edns_options_t; +" + ${CDEFS} ${LIBKRES} types <<-EOF #knot_pkt_t contains indirect recursion typedef knot_pkt_t - knot_edns_options_t knot_pktsection_t knot_compr_t struct knot_pkt