port "guile executable path" hack for non-macos from m3ua-testtool

I think it's a bad idea to make assumptions where the executalbe of the
guile interpreter lives, but in any case, let's at least make
m3ua-testtool and sua-testtool behave consistently here.
This commit is contained in:
Harald Welte 2017-04-17 10:37:44 +02:00
parent f3a0f7543e
commit 1da5c06540
1 changed files with 5 additions and 3 deletions

View File

@ -97,9 +97,11 @@ main(int argc, char *argv[]) {
}
if ((pid = fork()) == 0) {
execlp("/usr/local/bin/guile", "guile",
"-c", command,
(char *)0);
#if defined(__APPLE__) || defined(__FreeBSD__)
execlp("/usr/local/bin/guile", "guile", "-c", command, NULL);
#else
execlp("/usr/bin/guile", "guile", "-c", command, NULL);
#endif
fprintf(stderr, "%s\n", "Couln't start guile.");
}
printf("Test %-40.40s ", argv[optind]);