commit 45124b23d284d1e205d830591007b7415440b70e
parent c53230037ac8ebed34ff8bf1af0a94aea0843c2e
Author: Sören Tempel <soeren+git@soeren-tempel.net>
Date: Sun, 31 Oct 2021 17:46:35 +0100
upas: don't hardcode path for rc(1)
Diffstat:
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/cmd/upas/nfs/imap.c b/src/cmd/upas/nfs/imap.c
@@ -825,7 +825,8 @@ imapdial(char *server, int mode)
fd[0] = dup(p[0], -1);
fd[1] = dup(p[0], -1);
fd[2] = dup(2, -1);
- if(threadspawnl(fd, "/usr/local/plan9/bin/rc", "rc", "-c", server, nil) < 0){
+ /* could do better - use get9root for rc(1) path */
+ if(threadspawnl(fd, PLAN9_TARGET "/bin/rc", "rc", "-c", server, nil) < 0){
close(p[0]);
close(p[1]);
close(fd[0]);
diff --git a/src/cmd/upas/nfs/mkfile b/src/cmd/upas/nfs/mkfile
@@ -16,3 +16,5 @@ HFILES=a.h box.h imap.h sx.h
<$PLAN9/src/mkone
+imap.$O: imap.c
+ $CC $CFLAGS -DPLAN9_TARGET=\"$PLAN9_TARGET\" imap.c