meson: Defining MAJOR_IN_ as done by AC_HEADER_MAJOR

https://bugzilla.gnome.org/show_bug.cgi?id=784133
This commit is contained in:
Thibault Saunier 2017-06-23 11:58:51 -04:00 committed by Matthias Clasen
parent 10ae386727
commit 1d30c9eebc
2 changed files with 9 additions and 0 deletions

View File

@ -793,3 +793,6 @@
#mesondefine size_t
#mesondefine EXEEXT
#mesondefine MAJOR_IN_MKDEV
#mesondefine MAJOR_IN_SYSMACROS

View File

@ -363,6 +363,12 @@ elif cc.has_function('_strnicmp')
glib_conf_prefix = glib_conf_prefix + '#define HAVE_STRNCASECMP ' + hack_define
endif
if cc.has_header_symbol('sys/sysmacros.h', 'major')
glib_conf.set('MAJOR_IN_SYSMACROS', 1)
elif cc.has_header_symbol('sys/mkdev.h', 'major')
glib_conf.set('MAJOR_IN_MKDEV', 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