+2018-05-13 Bruno Haible <bruno@clisp.org>
+
+ mkfifo: Fix compilation error on Android.
+ * m4/mkfifo.m4 (gl_FUNC_MKFIFO): Use AC_LINK_IFELSE instead of
+ AC_CHECK_FUNC.
+
2018-05-13 Bruno Haible <bruno@clisp.org>
c-strtod: Fix configure test for Android.
-# serial 5
+# serial 6
# See if we need to provide mkfifo replacement.
dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
[
AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
- AC_CHECK_FUNCS_ONCE([mkfifo])
- if test $ac_cv_func_mkfifo = no; then
+
+ dnl We can't use AC_CHECK_FUNC here, because mkfifo() is defined as a
+ dnl static inline function when compiling for Android 4.4 or older.
+ AC_CACHE_CHECK([for mkfifo], [gl_cv_func_mkfifo],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/stat.h>]],
+ [[return mkfifo("/",0);]])
+ ],
+ [gl_cv_func_mkfifo=yes],
+ [gl_cv_func_mkfifo=no])
+ ])
+ if test $gl_cv_func_mkfifo = no; then
HAVE_MKFIFO=0
else
dnl Check for Solaris 9 and FreeBSD bug with trailing slash.