summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2021-01-23 13:22:56 +0900
committerYusuke Endoh <mame@ruby-lang.org>2021-01-23 13:24:06 +0900
commit33fb87cc9c1218463c54b0277f635318c1509629 (patch)
tree60c698b5439be078dc9efdfb32135b3f446270a8 /io.c
parent9efd590a13d1e8b8a141c46eabb48c2a1c286d2b (diff)
downloadruby-33fb87cc9c1218463c54b0277f635318c1509629.tar.gz
io.c: popen is not available on emscripten
Diffstat (limited to 'io.c')
-rw-r--r--io.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/io.c b/io.c
index 516673989a..2466cea7c1 100644
--- a/io.c
+++ b/io.c
@@ -6647,6 +6647,7 @@ rb_execarg_fixup_v(VALUE execarg_obj)
char *rb_execarg_commandline(const struct rb_execarg *eargp, VALUE *prog);
#endif
+#ifndef __EMSCRIPTEN__
static VALUE
pipe_open(VALUE execarg_obj, const char *modestr, int fmode,
const convconfig_t *convconfig)
@@ -6876,6 +6877,14 @@ pipe_open(VALUE execarg_obj, const char *modestr, int fmode,
#endif
return port;
}
+#else
+static VALUE
+pipe_open(VALUE execarg_obj, const char *modestr, int fmode,
+ const convconfig_t *convconfig)
+{
+ rb_raise(rb_eNotImpError, "popen() is not available");
+}
+#endif
static int
is_popen_fork(VALUE prog)