aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Moritz Angermann <moritz.angermann@gmail.com>2017-05-09 15:49:43 +0800
committerGravatar Herbert Valerio Riedel <hvr@gnu.org>2017-05-11 18:26:19 +0200
commitb5b62536e80344db4468d12fc6ded9fb4bc52be0 (patch)
tree9daf41c009afd755e05e9ede19f0347668bd07e8
parent9c2df120b2d6c8178d6cbef31bdcba3b574934be (diff)
Android doesn’t have mkstemps
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);} ^ ```
-rw-r--r--configure.ac3
1 files changed, 2 insertions, 1 deletions
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])