From 49d97ad1a36a32e8db8736a8a88b86c71428f58e Mon Sep 17 00:00:00 2001 From: Hydroxycarbamide Date: Tue, 21 May 2024 22:23:22 +0200 Subject: [PATCH] Fix build compilation errors with new iniparser 4.2.2 --- meson.build | 6 ++++++ src/config.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/meson.build b/meson.build index ed475753..a5b0255d 100644 --- a/meson.build +++ b/meson.build @@ -65,9 +65,15 @@ endif ### Iniparser iniparser_dep = cc.find_library('iniparser', has_headers: 'iniparser.h', required: false) + +if not iniparser_dep.found() + iniparser_dep = cc.find_library('iniparser', has_headers: 'iniparser/iniparser.h', required: false) +endif + if not iniparser_dep.found() iniparser_dep = cc.find_library('iniparser4', has_headers: 'iniparser4/iniparser.h', required: false) endif + if not iniparser_dep.found() error('iniparser library is required') else diff --git a/src/config.c b/src/config.c index 30afafb9..b5489921 100644 --- a/src/config.c +++ b/src/config.c @@ -6,6 +6,8 @@ #ifndef _MSC_VER #if __has_include() #include +#elif __has_include() +#include #elif __has_include() #include #endif