Skip to content

gresource-tool: fix build in case libelf is available on Windows. Fixes #1466

Christoph Reiter requested to merge build-fix-mingw-libelf into master

The gresource code uses libelf if available but that also depends on mmap but isn't guarded with HAVE_MMAP. This can make the build fail under MSYS2 where a mingw version of libelf exists but there is no mmap.

Instead of guarting the libelf code with HAVE_LIBELF add a new macro named USE_LIBELF which is only defined if libelf and mmap support are available.

Also install the mingw libelf version for CI so we catch similar errors in the future.

Merge request reports