From df31fa4a51822faccb35aa7a253c8af015869d0c Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Thu, 9 Dec 2021 12:44:45 +0900 Subject: [PATCH] [wasm] configure.ac: don't require dup and dup2 only for wasi --- configure.ac | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 2696d6e76c..e20e133feb 100644 --- a/configure.ac +++ b/configure.ac @@ -1930,7 +1930,14 @@ AC_DEFUN([RUBY_REQUIRE_FUNC], [ AS_IF([test "$ac_cv_func_[]AS_TR_SH($1)" = yes], [], [AC_MSG_ERROR($1[() must be supported])]) ]) -m4_map_args_w([dup dup2], [RUBY_REQUIRE_FUNC(], [)]) + +# dup and dup2 are always available except for WASI +AS_CASE(["$target_os"], + [wasi*], [], + [ + m4_map_args_w([dup dup2], [RUBY_REQUIRE_FUNC(], [)]) + ] +) AC_REPLACE_FUNCS(acosh) AC_REPLACE_FUNCS(cbrt)