aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-04-29 16:04:35 +0200
committerGitHub <noreply@github.com>2020-04-29 16:04:35 +0200
commitaeb406dd1bb4a0cf270b64c877b3d22c25d5358a (patch)
tree8ebcf30f1abbd645212cc11badcfb29b4c7f3ca7 /src
parent06849c3090615d85dbba17b674e97dff71bd41bc (diff)
parentca93b26db6d2d73e702ea8ecdd0a98f17ace2c7b (diff)
Merge pull request #3547 from nlewo/grantpt
Only call grantpt on MacOS systems
Diffstat (limited to 'src')
-rw-r--r--src/libstore/build.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 572634765..147093fae 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -2250,10 +2250,13 @@ void DerivationGoal::startBuilder()
if (chown(slaveName.c_str(), buildUser->getUID(), 0))
throw SysError("changing owner of pseudoterminal slave");
- } else {
+ }
+#if __APPLE__
+ else {
if (grantpt(builderOut.readSide.get()))
throw SysError("granting access to pseudoterminal slave");
}
+#endif
#if 0
// Mount the pt in the sandbox so that the "tty" command works.