]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
kluautil: remove hard depedency on lua-cqueues
authorPetr Špaček <petr.spacek@nic.cz>
Fri, 16 Oct 2020 08:15:32 +0000 (10:15 +0200)
committerTomas Krizek <tomas.krizek@nic.cz>
Mon, 26 Oct 2020 13:25:14 +0000 (14:25 +0100)
For now we still attempt to support systems without lua-cqueues,
e.g. Ubuntu 16.04.

lua-http depends on lua-cqueues so the test for availability of lua-http
at the beginning of kr_https_fetch() should cover lua-cqueues as well.

daemon/lua/kluautil.lua

index b96a4bad71804b3f496df3906e108772cee5360c..a1aebc7654278fad99642e3efb0616254abfc282 100644 (file)
@@ -1,6 +1,5 @@
 -- SPDX-License-Identifier: GPL-3.0-or-later
 
-local cqerrno = require('cqueues.errno')
 local ffi = require('ffi')
 local kluautil = {}
 
@@ -53,6 +52,7 @@ function kluautil.kr_https_fetch(url, out_file, ca_file)
        if not http_ok or not httptls_ok or not openssl_ok then
                return nil, 'error: lua-http and luaossl libraries are missing (but required)'
        end
+       local cqerrno = require('cqueues.errno')
 
        assert(string.match(url, '^https://'))