aboutsummaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/util.c b/util.c
index fca9e67541..733045daa4 100644
--- a/util.c
+++ b/util.c
@@ -462,6 +462,15 @@ ruby_strdup(const char *str)
return tmp;
}
+#ifdef __native_client__
+char *
+ruby_getcwd(void)
+{
+ char *buf = xmalloc(2);
+ strcpy(buf, ".");
+ return buf;
+}
+#else
char *
ruby_getcwd(void)
{
@@ -490,6 +499,7 @@ ruby_getcwd(void)
#endif
return buf;
}
+#endif
/****************************************************************
*