From: Michael Jeanson Date: Wed, 4 Nov 2020 15:04:12 +0000 (-0500) Subject: port: FreeBSD does support fchown and fchmod on a shm fd X-Git-Tag: v2.13.0-rc1~431 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=b9bbdb8ae401dea58c56845fceb6b615225df6b4;ds=sidebyside port: FreeBSD does support fchown and fchmod on a shm fd Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau Change-Id: Iadff886d593ae3f77a4e96dfbfe02d1c1ea45f1e --- diff --git a/src/bin/lttng-sessiond/shm.c b/src/bin/lttng-sessiond/shm.c index 1fc07dbd3..8b7744221 100644 --- a/src/bin/lttng-sessiond/shm.c +++ b/src/bin/lttng-sessiond/shm.c @@ -106,7 +106,6 @@ static int get_wait_shm(char *shm_path, size_t mmap_size, int global) exit(EXIT_FAILURE); } -#ifndef __FreeBSD__ if (global) { ret = fchown(wait_shm_fd, 0, 0); if (ret < 0) { @@ -131,9 +130,6 @@ static int get_wait_shm(char *shm_path, size_t mmap_size, int global) exit(EXIT_FAILURE); } } -#else -#warning "FreeBSD does not support setting file mode on shm FD." -#endif DBG("Got the wait shm fd %d", wait_shm_fd);