From 04069bbe9d9cef3e0f5a8cc6eb80c5a900ec0b86 Mon Sep 17 00:00:00 2001 From: Elie Zedeck Date: Sun, 16 Nov 2014 12:53:43 +0300 Subject: [PATCH] Uses execve() in osproc on OpenWrt and uClibc-based platforms. --- lib/pure/osproc.nim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim index 2983712c82..bfdb0efeda 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)