1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 17:51:15 +02:00

Merge pull request #704 from ysangkok/freebsd-support

FreeBSD support with knowledge about Linux emulation
This commit is contained in:
Eelco Dolstra 2015-11-24 19:24:21 +01:00
commit cad40adce5
6 changed files with 16 additions and 3 deletions

View file

@ -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)