diff --git a/gio/meson.build b/gio/meson.build index 447ddd6b2..a56c210a0 100644 --- a/gio/meson.build +++ b/gio/meson.build @@ -969,6 +969,9 @@ else have_libelf = have_libelf and cc.has_function('elf_getshdrstrndx', dependencies : libelf) have_libelf = have_libelf and cc.has_function('elf_getshdrnum', dependencies : libelf) have_libelf = have_libelf and cc.has_header('libelf.h') + # This check is necessary for Solaris & illumos, where 32-bit libelf + # is incompatible with large-file mode, which meson forces to be enabled + have_libelf = have_libelf and cc.compiles('#include ', name: 'libelf.h') endif if have_libelf