From 6d7c759b430bebb5a2a3ef6954bbb889ff55c378 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Thu, 11 Mar 2010 18:52:52 +0100 Subject: Few bugs found by lint of OpenSuSE, many thanks to Novel --- src/rccexternal.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/rccexternal.c') diff --git a/src/rccexternal.c b/src/rccexternal.c index 080e4da..f1e8fba 100644 --- a/src/rccexternal.c +++ b/src/rccexternal.c @@ -70,6 +70,7 @@ static char *addr = NULL; int rccExternalInit() { #ifdef HAVE_SIGNAL_H struct sigaction act; + struct stat st; #endif /* HAVE_SIGNAL_H */ if (pid != (pid_t)-1) return 0; @@ -93,8 +94,12 @@ int rccExternalInit() { return 0; } - - execl(LIBRCC_DATA_DIR "/" RCC_EXT_PROG_NAME, RCC_EXT_PROG_NAME, NULL); + + /*if ((!stat("../external/" RCC_EXT_PROG_NAME, &st))&&(st.st_mode&S_IXOTH)) { + execl ("../external/" RCC_EXT_PROG_NAME, RCC_EXT_PROG_NAME, NULL); + } else*/ if ((!stat(LIBRCC_DATA_DIR "/" RCC_EXT_PROG_NAME, &st))&&(st.st_mode&S_IXOTH)) { + execl(LIBRCC_DATA_DIR "/" RCC_EXT_PROG_NAME, RCC_EXT_PROG_NAME, NULL); + } exit(1); } -- cgit v1.2.3