diff --git a/recipes/dash/recipe.sh b/recipes/dash/recipe.sh
index 725a93e76a54d8f809b3c15725aeb7fee0071ca9..a0974a6baeeaa1c8a3581a623c3831cb39399794 100644
--- a/recipes/dash/recipe.sh
+++ b/recipes/dash/recipe.sh
@@ -19,7 +19,9 @@ function recipe_build {
         --prefix=/ \
         --enable-static \
         cross_compiling=yes
-    sed -i 's|#define HAVE_GETRLIMIT 1|/* #undef HAVE_GETRLIMIT */|g' config.h
+
+    # See https://stackoverflow.com/questions/4247068/sed-command-with-i-option-failing-on-mac-but-works-on-linux.
+    sed -i'' -e 's|#define HAVE_GETRLIMIT 1|/* #undef HAVE_GETRLIMIT */|g' config.h
     make -j"$(nproc)"
     skip=1
 }