[commit: packages/unix] master: Android doesn’t have mkstemps (b5b6253)
git at git.haskell.org
git at git.haskell.org
Wed Jul 19 22:05:07 UTC 2017
Repository : ssh://git@git.haskell.org/unix
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/b5b62536e80344db4468d12fc6ded9fb4bc52be0/unix
>---------------------------------------------------------------
commit b5b62536e80344db4468d12fc6ded9fb4bc52be0
Author: Moritz Angermann <moritz.angermann at gmail.com>
Date: Tue May 9 15:49:43 2017 +0800
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);}
^
```
>---------------------------------------------------------------
b5b62536e80344db4468d12fc6ded9fb4bc52be0
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])
More information about the ghc-commits
mailing list