[prev in list] [next in list] [prev in thread] [next in thread]
List: freebsd-hackers
Subject: Re: SOL_LOCAL define
From: Konstantin Belousov <kostikbel () gmail ! com>
Date: 2020-08-03 17:11:28
Message-ID: 20200803171128.GV2551 () kib ! kiev ! ua
[Download RAW message or body]
On Mon, Aug 03, 2020 at 12:19:42PM -0400, Steve Wills wrote:
> Hi,
>
> I ran into a case where some code I was building expected SOL_LOCAL to be
> defined since LOCAL_PEERCRED was defined. See:
>
> https://github.com/nanomsg/nng/pull/1272
>
> for details. And looking at getpeereid.c:
>
> https://svnweb.freebsd.org/base/head/lib/libc/gen/getpeereid.c?view=markup#l50
>
> I see:
>
> error = _getsockopt(s, 0, LOCAL_PEERCRED, &xuc, &xuclen);
>
> I wonder if something like a:
>
> #define SOL_LOCAL 0
>
> in sys/sys/un.h and a change to the above to:
>
> error = _getsockopt(s, SOL_LOCAL, LOCAL_PEERCRED, &xuc, &xuclen);
>
> might be useful for compatibility and clarity? Any opinions?
This is something added by MacOS X 10.8 it seems.
I see no negative effects of the addition, so why not.
https://reviews.freebsd.org/D25933
_______________________________________________
freebsd-hackers@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic