From 24e7f46a431b59043bf534eb7cdab76c4ffd595a Mon Sep 17 00:00:00 2001
From: yrutschle <git1@rutschle.net>
Date: Wed, 23 Jun 2021 11:48:59 +0200
Subject: [PATCH] fix for libconfig 1.7.3 (#292)

---
 sslh-conf.c    | 50 +++++++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 88 insertions(+), 16 deletions(-)

diff --git a/sslh-conf.c b/sslh-conf.c
index 5f55656..530ef6b 100644
--- a/sslh-conf.c
+++ b/sslh-conf.c
@@ -126,6 +126,14 @@ typedef int config_t;
         return 0; \
     }
 
+enum {
+    CONFIG_TYPE_INT,
+    CONFIG_TYPE_BOOL,
+    CONFIG_TYPE_INT64,
+    CONFIG_TYPE_FLOAT,
+    CONFIG_TYPE_STRING
+};
+
 make_config_setting_lookup(bool);
 make_config_setting_lookup(int);
 make_config_setting_lookup(int64);
@@ -134,10 +142,14 @@ make_config_setting_lookup(string);
 
 make_config_setting_get(bool, int);
 make_config_setting_get(int, int);
-make_config_setting_get(int64, int);
+make_config_setting_get(int64, long long int);
 make_config_setting_get(float, double);
 make_config_setting_get(string, char*);
 
+config_setting_t* config_root_setting(config_t* c) {
+    return NULL;
+}
+
 config_setting_t* config_lookup(config_t* c, const char* b) {
     return NULL;
 }
@@ -146,10 +158,38 @@ void config_init(config_t* c) {
     return;
 }
 
+char* config_setting_name(config_setting_t* c) {
+    return NULL;
+}
+
+int config_setting_is_list(config_setting_t* c) {
+    return 0;
+}
+
+int config_setting_is_array(config_setting_t* c) {
+    return 0;
+}
+
+int config_setting_is_scalar(config_setting_t* c) {
+    return 0;
+}
+
+int config_setting_index(const config_setting_t *setting) {
+    return 0;
+}
+
 config_setting_t* config_setting_lookup(config_setting_t* a, char* b) {
     return NULL;
 }
 
+int config_setting_remove(config_setting_t* cfg, char* name) {
+    return 0;
+}
+
+int config_setting_type(config_setting_t* s) {
+    return -1;
+}
+
 int config_setting_length(config_setting_t* a) {
     return 0;
 }
@@ -1792,7 +1832,7 @@ int sslhcfg_cl_parse(int argc, char* argv[], struct sslhcfg_item* cfg)
         }
     }
 
-    s = config_lookup(&c, "/");
+    s = config_root_setting(&c);
 
     res = read_block(s, cfg, table_sslhcfg, &errmsg);
     if (!res) {
