From: Guus Sliepen Date: Thu, 10 Sep 2009 17:51:08 +0000 (+0200) Subject: Don't stat() on iPhone/iPod. X-Git-Tag: import-tinc-1.1~592^2~15 X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=a60a0a1f1357508063ee565d672c39898a787e33;p=meshlink Don't stat() on iPhone/iPod. Grzegorz Dymarek noted that tinc segfaults at the stat() call in execute_script() on the iPhone. We can omit the stat() call for the moment, the subsequent call to system() will fail with just a warning. --- diff --git a/src/process.c b/src/process.c index d07ce7db..f03f12a4 100644 --- a/src/process.c +++ b/src/process.c @@ -380,12 +380,14 @@ bool execute_script(const char *name, char **envp) scriptname[len - 1] = '\0'; +#ifndef HAVE_TUNEMU /* First check if there is a script */ if(stat(scriptname + 1, &s)) { free(scriptname); return true; } +#endif ifdebug(STATUS) logger(LOG_INFO, _("Executing script %s"), name);