From: Petr Špaček Date: Fri, 15 Jun 2018 12:12:29 +0000 (+0200) Subject: fixup! daemon/lua: added basic bindings for LRU X-Git-Tag: v2.4.0~13^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3b2474ab3b97c22c57b4696e93c3a69ebe5ffb4;p=thirdparty%2Fknot-resolver.git fixup! daemon/lua: added basic bindings for LRU Fix mess in daemon/lua/kres-gen.lua after 6e2ed9ec29be56e4ee08d8bae8bf3ba978bbbf86 --- diff --git a/daemon/lua/kres-gen.lua b/daemon/lua/kres-gen.lua index 74700c652..8fc957d8e 100644 --- a/daemon/lua/kres-gen.lua +++ b/daemon/lua/kres-gen.lua @@ -5,6 +5,7 @@ typedef struct knot_dump_style knot_dump_style_t; extern const knot_dump_style_t KNOT_DUMP_STYLE_DEFAULT; typedef void knot_db_t; struct kr_cdb_api {}; +struct lru {}; typedef struct knot_mm { void *ctx, *alloc, *free; @@ -310,7 +311,7 @@ void kr_zonecut_set(struct kr_zonecut *, const knot_dname_t *); uint64_t kr_now(); void lru_free_items_impl(struct lru *); struct lru *lru_create_impl(unsigned int, knot_mm_t *, knot_mm_t *); -void *lru_get_impl(struct lru *, const char *, unsigned int, unsigned int, bool, bool *); +void *lru_get_impl(struct lru *, const char *, unsigned int, unsigned int, _Bool, _Bool *); knot_rrset_t *kr_ta_get(map_t *, const knot_dname_t *); int kr_ta_add(map_t *, const knot_dname_t *, uint16_t, uint32_t, const uint8_t *, uint16_t); int kr_ta_del(map_t *, const knot_dname_t *); diff --git a/scripts/gen-cdefs.sh b/scripts/gen-cdefs.sh index 43c8de7af..4938abeea 100755 --- a/scripts/gen-cdefs.sh +++ b/scripts/gen-cdefs.sh @@ -53,6 +53,8 @@ grep -v '^#\|^$' | while read -r ident; do ;; esac fi + # LuaJIT FFI blows up on "uint" type + output="$(echo "$output" | sed 's/\buint\b/unsigned int/g')" # abort on empty output if [ -z "$(echo "$output" | tr -d "\n;")" ]; then