aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/gen/getpeereid.c
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2020-08-03 22:13:02 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2020-08-03 22:13:02 +0000
commit6e0c8e1ae292e567ba6260d9a6c0b771629a89e3 (patch)
tree7e907ced00311ca65beaf6f1c593bdbd544dd01d /lib/libc/gen/getpeereid.c
parente67c55c998417a2b3ad6d25086e14a96e6fabe69 (diff)
downloadsrc-6e0c8e1ae292e567ba6260d9a6c0b771629a89e3.tar.gz
src-6e0c8e1ae292e567ba6260d9a6c0b771629a89e3.zip
Add SOL_LOCAL symbolic constant for unix socket option level.
The constant seems to exists on MacOS X >= 10.8. Requested by: swills Reviewed by: allanjude, kevans Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D25933
Notes
Notes: svn path=/head/; revision=363813
Diffstat (limited to 'lib/libc/gen/getpeereid.c')
-rw-r--r--lib/libc/gen/getpeereid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/gen/getpeereid.c b/lib/libc/gen/getpeereid.c
index 530ae0e6100e..86396d359ba3 100644
--- a/lib/libc/gen/getpeereid.c
+++ b/lib/libc/gen/getpeereid.c
@@ -47,7 +47,7 @@ getpeereid(int s, uid_t *euid, gid_t *egid)
int error;
xuclen = sizeof(xuc);
- error = _getsockopt(s, 0, LOCAL_PEERCRED, &xuc, &xuclen);
+ error = _getsockopt(s, SOL_LOCAL, LOCAL_PEERCRED, &xuc, &xuclen);
if (error != 0)
return (error);
if (xuc.cr_version != XUCRED_VERSION) {