meson: Fix the build defining HAVE_RTLD_X

Otherwise RTLD_XXX get redefined.

https://bugzilla.gnome.org/show_bug.cgi?id=784133
This commit is contained in:
Thibault Saunier 2017-06-23 12:36:38 -04:00 committed by Matthias Clasen
parent eb2196e89d
commit 0689231bd6
2 changed files with 15 additions and 0 deletions

View File

@ -796,3 +796,6 @@
#mesondefine MAJOR_IN_MKDEV
#mesondefine MAJOR_IN_SYSMACROS
#mesondefine HAVE_RTLD_LAZY
#mesondefine HAVE_RTLD_NOW
#mesondefine HAVE_RTLD_GLOBAL

View File

@ -369,6 +369,18 @@ elif cc.has_header_symbol('sys/mkdev.h', 'major')
glib_conf.set('MAJOR_IN_MKDEV', 1)
endif
if cc.has_header_symbol('dlfcn.h', 'RTLD_LAZY')
glib_conf.set('HAVE_RTLD_LAZY', 1)
endif
if cc.has_header_symbol('dlfcn.h', 'RTLD_NOW')
glib_conf.set('HAVE_RTLD_NOW', 1)
endif
if cc.has_header_symbol('dlfcn.h', 'RTLD_GLOBAL')
glib_conf.set('HAVE_RTLD_GLOBAL', 1)
endif
# Check whether to use statfs or statvfs
# Some systems have both statfs and statvfs, pick the most "native" for these
if have_func_statfs and have_func_statvfs