Merge remote-tracking branch 'check/next-cc'

Origin commit data
------------------
Branch: ni/coolstream
Commit: e9bc524562
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2014-01-27 (Mon, 27 Jan 2014)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2014-01-27 21:00:18 +01:00
11 changed files with 51 additions and 9 deletions

View File

@@ -294,9 +294,11 @@ bool get_mem_usage(unsigned long &kbtotal, unsigned long &kbfree)
std::string find_executable(const char *name)
{
struct stat s;
char *path = getenv("PATH");
char *p, *n;
if (! path)
char *tmpPath = getenv("PATH");
char *p, *n, *path;
if (tmpPath)
path = strdupa(tmpPath);
else
path = strdupa("/bin:/usr/bin:/sbin:/usr/sbin");
if (name[0] == '/') { /* full path given */
if (!access(name, X_OK) && !stat(name, &s) && S_ISREG(s.st_mode))