summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <thibault.saunier@osg.samsung.com>2017-06-23 11:58:51 -0400
committerMatthias Clasen <mclasen@redhat.com>2017-07-13 19:03:39 -0400
commit1d30c9eebc8bc4efcd8da8c479040389edd0cfe3 (patch)
tree86830ed7c82385b765bf490e7752a4f662dadc5c
parent10ae3867274457aa2906b96991e46fbce3db63bd (diff)
downloadglib-1d30c9eebc8bc4efcd8da8c479040389edd0cfe3.tar.gz
meson: Defining MAJOR_IN_ as done by AC_HEADER_MAJOR
https://bugzilla.gnome.org/show_bug.cgi?id=784133
-rw-r--r--config.h.meson3
-rw-r--r--meson.build6
2 files changed, 9 insertions, 0 deletions
diff --git a/config.h.meson b/config.h.meson
index b8b419ea4..7346b9254 100644
--- a/config.h.meson
+++ b/config.h.meson
@@ -793,3 +793,6 @@
#mesondefine size_t
#mesondefine EXEEXT
+
+#mesondefine MAJOR_IN_MKDEV
+#mesondefine MAJOR_IN_SYSMACROS
diff --git a/meson.build b/meson.build
index c954fbda8..892a7ce6a 100644
--- a/meson.build
+++ b/meson.build
@@ -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