aboutsummaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>2021-03-15 22:21:12 +0000
committerAlexander Richardson <alexander.richardson@cl.cam.ac.uk>2021-09-10 11:35:54 +0000
commit54b237a61257a41d35d018c5871331bdf1df77a6 (patch)
tree97febf193bf1ea57e8eb5b6b5c5530bd71a5001d /meson.build
parentgitlab-ci: add junit reports to the debian builder (diff)
downloadwayland-54b237a61257a41d35d018c5871331bdf1df77a6.tar
wayland-54b237a61257a41d35d018c5871331bdf1df77a6.tar.gz
wayland-54b237a61257a41d35d018c5871331bdf1df77a6.tar.bz2
wayland-54b237a61257a41d35d018c5871331bdf1df77a6.tar.lz
wayland-54b237a61257a41d35d018c5871331bdf1df77a6.tar.xz
wayland-54b237a61257a41d35d018c5871331bdf1df77a6.tar.zst
wayland-54b237a61257a41d35d018c5871331bdf1df77a6.zip
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>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build3
1 files changed, 2 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 427aacf..aeb171e 100644
--- a/meson.build
+++ b/meson.build
@@ -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'