mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -04:00
Support reading ucred from the socket on FreeBSD
On FreeBSD we have to use getsockopt(fd, SOL_LOCAL, LOCAL_PEERCRED) instead. This change is based on a downstream patch in FreeBSD ports. Co-authored-by: Greg V <greg@unrelenting.technology> Co-authored-by: Koop Mast <kwm@rainbow-runner.nl> Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
This commit is contained in:
parent
f1552700ce
commit
54b237a612
4 changed files with 63 additions and 11 deletions
|
|
@ -26,7 +26,7 @@ add_project_arguments(
|
|||
language: 'c'
|
||||
)
|
||||
|
||||
foreach h: [ 'sys/prctl.h' ]
|
||||
foreach h: [ 'sys/prctl.h', 'sys/ucred.h' ]
|
||||
config_h.set('HAVE_' + h.underscorify().to_upper(), cc.has_header(h))
|
||||
endforeach
|
||||
|
||||
|
|
@ -41,6 +41,7 @@ have_funcs = [
|
|||
foreach f: have_funcs
|
||||
config_h.set('HAVE_' + f.underscorify().to_upper(), cc.has_function(f))
|
||||
endforeach
|
||||
config_h.set10('HAVE_XUCRED_CR_PID', cc.has_member('struct xucred', 'cr_pid', prefix : '#include <sys/ucred.h>'))
|
||||
|
||||
if get_option('libraries')
|
||||
if host_machine.system() == 'freebsd'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue