--- a/src/libtscore/system/tsForkPipe.cpp
+++ b/src/libtscore/system/tsForkPipe.cpp
@@ -20,7 +20,7 @@
 // Path to defaut basic shell on UNIX systems.
 // Can be overridden on the command line, eg. make CXXFLAGS_EXTRA="-DTS_SHELL_PATH=/foo/bar/bin/sh"
 #if !defined(TS_SHELL_PATH)
-    #define TS_SHELL_PATH /bin/sh
+    #define TS_SHELL_PATH @TERMUX_PREFIX@/bin/sh
 #endif
 #if !defined(TS_SHELL_STRING)
     #define TS_SHELL_STRING TS_STRINGIFY(TS_SHELL_PATH)
