[PATCH v5 05/11] core: define SO_PEERCRED if it's not defined

Pekka Paalanen ppaalanen at gmail.com
Mon Feb 25 13:05:31 UTC 2019


On Wed, 13 Feb 2019 13:39:10 +0200
Leonid Bobrov via wayland-devel <wayland-devel at lists.freedesktop.org> wrote:

> Signed-off-by: Leonid Bobrov <mazocomp at disroot.org>
> ---
>  src/wayland-os.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/src/wayland-os.h b/src/wayland-os.h
> index 86685e0..08b38bd 100644
> --- a/src/wayland-os.h
> +++ b/src/wayland-os.h
> @@ -41,6 +41,9 @@ wl_os_event_create_cloexec(void);
>  int
>  wl_os_accept_cloexec(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
>  
> +#ifndef SO_PEERCRED
> +#define SO_PEERCRED LOCAL_PEERCRED
> +#endif
>  
>  /*
>   * The following are for wayland-os.c and the unit tests.

Hi Leonid,

while this is good otherwise, this header is not #including
sys/socket.h which would be necessary to get the definition of
SO_PEERCRED when it does exist.

I believe a

#include <sys/socket.h>

is therefore needed.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20190225/4df0d325/attachment-0001.sig>


More information about the wayland-devel mailing list