docker-playground/sua-test/0002-port-guile-executable-...

36 lines
1.1 KiB
Diff

From 1da5c06540daf6223eed3a8bc2b0aa0ac4a0182b Mon Sep 17 00:00:00 2001
From: Harald Welte <laforge@gnumonks.org>
Date: Mon, 17 Apr 2017 10:37:44 +0200
Subject: [PATCH 2/2] 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.
---
run-sua-test.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/run-sua-test.c b/run-sua-test.c
index 9b49891..f8a4e36 100644
--- a/run-sua-test.c
+++ b/run-sua-test.c
@@ -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]);
--
2.11.0