aboutsummaryrefslogtreecommitdiff
path: root/src/nix-daemon
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-11-24 19:24:21 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-11-24 19:24:21 +0100
commitcad40adce5eda7a50e7d40dae4e88219ef3fe0cf (patch)
tree3ea518fd4b32ec365585405073102b26d69e0352 /src/nix-daemon
parent6c10bd7c5e946424996e3628e74ba433207aa90e (diff)
parent8a74a125bc3ac7a8273b8a1be8f0774a664900af (diff)
Merge pull request #704 from ysangkok/freebsd-support
FreeBSD support with knowledge about Linux emulation
Diffstat (limited to 'src/nix-daemon')
-rw-r--r--src/nix-daemon/nix-daemon.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nix-daemon/nix-daemon.cc b/src/nix-daemon/nix-daemon.cc
index b4d1401d9..e97d1dab1 100644
--- a/src/nix-daemon/nix-daemon.cc
+++ b/src/nix-daemon/nix-daemon.cc
@@ -692,6 +692,10 @@ static PeerInfo getPeerInfo(int remote)
#elif defined(LOCAL_PEERCRED)
+#if !defined(SOL_LOCAL)
+#define SOL_LOCAL 0
+#endif
+
xucred cred;
socklen_t credLen = sizeof(cred);
if (getsockopt(remote, SOL_LOCAL, LOCAL_PEERCRED, &cred, &credLen) == -1)