mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 06:56:14 +01:00
build: Look for mkostemp when configuring
We use this function, but it may be missing on older Linux platforms. https://bugzilla.gnome.org/show_bug.cgi?id=788705
This commit is contained in:
parent
7b15f12f0e
commit
f40154e218
@ -376,6 +376,9 @@
|
||||
/* Define to 1 if you have the `statvfs' function. */
|
||||
#mesondefine HAVE_STATVFS
|
||||
|
||||
/* Define to 1 if you have the `mkostemp' function. */
|
||||
#mesondefine HAVE_MKOSTEMP
|
||||
|
||||
/* Define to 1 if you have the <stddef.h> header file. */
|
||||
#mesondefine HAVE_STDDEF_H
|
||||
|
||||
|
@ -880,7 +880,7 @@ int main ()
|
||||
AC_MSG_RESULT($glib_ssize_type)
|
||||
|
||||
# Check for some functions
|
||||
AC_CHECK_FUNCS(lstat strsignal vsnprintf stpcpy strcasecmp strncasecmp poll vasprintf setenv unsetenv getc_unlocked readlink symlink fdwalk)
|
||||
AC_CHECK_FUNCS(lstat strsignal vsnprintf stpcpy strcasecmp strncasecmp poll vasprintf setenv unsetenv getc_unlocked readlink symlink fdwalk mkostemp)
|
||||
AC_CHECK_FUNCS(lchmod lchown fchmod fchown utimes getresuid)
|
||||
AC_CHECK_FUNCS(getmntent_r setmntent endmntent hasmntopt getfsstat getvfsstat fallocate)
|
||||
case $host_os in aix*) ac_cv_func_splice=no ;; esac # AIX splice() is something else
|
||||
|
@ -451,6 +451,14 @@ else
|
||||
endif
|
||||
message('Checking whether to use statfs or statvfs .. ' + stat_func_to_use)
|
||||
|
||||
if host_system == 'linux'
|
||||
if cc.has_function('mkostemp',
|
||||
prefix: '''#define _GNU_SOURCE
|
||||
#include <stdlib.h>''')
|
||||
glib_conf.set('HAVE_MKOSTEMP', 1)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Mac OS X Carbon support
|
||||
glib_have_carbon = cc.compiles('''#include <Carbon/Carbon.h>
|
||||
#include <CoreServices/CoreServices.h>''',
|
||||
|
Loading…
Reference in New Issue
Block a user