Skip to content

Commit

Permalink
Merge pull request #18 from hydroxycarbamide/master
Browse files Browse the repository at this point in the history
Fix build compilation errors with new iniparser 4.2.2
  • Loading branch information
LukashonakV authored May 23, 2024
2 parents ca02eef + 49d97ad commit a02946c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#ifndef _MSC_VER
#if __has_include(<iniparser.h>)
#include <iniparser.h>
#elif __has_include(<iniparser/iniparser.h>)
#include <iniparser/iniparser.h>
#elif __has_include(<iniparser4/iniparser.h>)
#include <iniparser4/iniparser.h>
#endif
Expand Down

0 comments on commit a02946c

Please sign in to comment.