From b5b62536e80344db4468d12fc6ded9fb4bc52be0 Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Tue, 9 May 2017 15:49:43 +0800 Subject: Android doesn’t have mkstemps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit However the check similarly to tell and seekdir succeeds. However we will generate the following error down the line: ``` /var/folders/fv/xqjrpfj516n5xq_m_ljpsjx00000gn/T/ghc13524_0/ghc_2.c:11:104: error: warning: implicit declaration of function 'mkstemps' is invalid in C99 [-Wimplicit-function-declaration] | 11 | HsInt32 ghczuwrapperZC1ZCunixzm2zi7zi2zi1ZCSystemziPosixziTempZCmkstemps(void* a1, HsInt32 a2) {return mkstemps(a1, a2);} | ^ HsInt32 ghczuwrapperZC1ZCunixzm2zi7zi2zi1ZCSystemziPosixziTempZCmkstemps(void* a1, HsInt32 a2) {return mkstemps(a1, a2);} ^ ``` --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 32f7174..b23caef 100644 --- a/configure.ac +++ b/configure.ac @@ -73,7 +73,8 @@ AC_CHECK_FUNCS([utimensat futimens]) AC_CHECK_FUNCS([lutimes futimes]) # Additional temp functions -AC_CHECK_FUNCS([mkstemps mkdtemp]) +dnl androids bionic doesn't have mkstemps +AS_CASE([$target_os],[*-android*],[AC_CHECK_FUNCS([mkdtemp])],[AC_CHECK_FUNCS([mkstemps mkdtemp])]) # Functions for file synchronization and allocation control AC_CHECK_FUNCS([fsync]) -- cgit v1.2.3