mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 15:56:23 +01:00
build: Use cc.check_header() to check malloc.h
Since Meson 0.47, this can be used to check a header with compilation, rather than just stat. This removes a workaround. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
parent
768c87697e
commit
51c55b44ad
@ -337,9 +337,9 @@ foreach h : headers
|
|||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
# FIXME: Use cc.check_header from Meson 0.47.
|
# FreeBSD includes a malloc.h which always throws compilation error, so we have
|
||||||
# FreeBSD includes a malloc.h which always throw compilation error.
|
# to use check_header() rather than has_header().
|
||||||
if cc.compiles('#include <malloc.h>', name : 'malloc.h')
|
if cc.check_header('malloc.h')
|
||||||
glib_conf.set('HAVE_MALLOC_H', 1)
|
glib_conf.set('HAVE_MALLOC_H', 1)
|
||||||
glib_conf_prefix = glib_conf_prefix + '#define HAVE_MALLOC_H 1\n'
|
glib_conf_prefix = glib_conf_prefix + '#define HAVE_MALLOC_H 1\n'
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user