]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
fixup! daemon/lua: added basic bindings for LRU
authorPetr Špaček <petr.spacek@nic.cz>
Fri, 15 Jun 2018 12:12:29 +0000 (14:12 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Tue, 26 Jun 2018 11:55:22 +0000 (13:55 +0200)
Fix mess in daemon/lua/kres-gen.lua after
6e2ed9ec29be56e4ee08d8bae8bf3ba978bbbf86

daemon/lua/kres-gen.lua
scripts/gen-cdefs.sh

index 74700c652303df0b00a8ce57070dd81a26c5ce94..8fc957d8e199a67b4336290b767128230923925a 100644 (file)
@@ -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 *);
index 43c8de7af84ca99fe33435ddb8a9c211a75d5d37..4938abeea95bbdf8f15db6c6905babaad1ce8e6c 100755 (executable)
@@ -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