summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorElie Zedeck <elie.zedeck@gmail.com>2014-11-16 12:53:43 +0300
committerElie Zedeck <elie.zedeck@gmail.com>2014-11-16 12:53:43 +0300
commit04069bbe9d9cef3e0f5a8cc6eb80c5a900ec0b86 (patch)
treea3de266f3703ed48d3ccccc9782751da648b7ecc /lib
parent03d76c6d5e00d6a4f2b99ab51df7a8c4109dc1db (diff)
downloadNim-04069bbe9d9cef3e0f5a8cc6eb80c5a900ec0b86.tar.gz
Uses execve() in osproc on OpenWrt and uClibc-based platforms.
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/osproc.nim6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim
index 2983712c8..bfdb0efed 100644
--- a/lib/pure/osproc.nim
+++ b/lib/pure/osproc.nim
@@ -822,7 +822,11 @@ elif not defined(useNimRtl):
         environ = data.sysEnv
         discard execvp(data.sysCommand, data.sysArgs)
       else:
-        discard execvpe(data.sysCommand, data.sysArgs, data.sysEnv)
+        when defined(uClibc):
+          # uClibc environment (OpenWrt included) doesn't have the full execvpe 
+          discard execve(data.sysCommand, data.sysArgs, data.sysEnv)
+        else:
+          discard execvpe(data.sysCommand, data.sysArgs, data.sysEnv)
     else:
       discard execve(data.sysCommand, data.sysArgs, data.sysEnv)