[PATCH] daemon: Debian/kFreeBSD 9.2 fails to compile due to caps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2014-09-02 at 00:08 +0200, Peter Meerwald wrote:
> Debian/kFreeBSD 9.2 comes with sys/capability.h but it is not usable; work around it
> 
> the patch does several things:
> * it makes the comment point to the correct bugtracker issue: https://bugs.freedesktop.org/show_bug.cgi?id=72580
> * it handles Debian/kFreeBSD the same way as FreeBSD
> * it logs a warning that capabilities are actually NOT dropped
> 
> daemon/caps.c: In function ?pa_drop_caps?:
> daemon/caps.c:93:2: error: #error "Don't know how to do capabilities on your system.  Please send a patch."
>  #error "Don't know how to do capabilities on your system.  Please send a patch."
>   ^
> Makefile:9575: recipe for target 'daemon/pulseaudio-caps.o' failed
> 
> Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>
> ---
>  src/daemon/caps.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/src/daemon/caps.c b/src/daemon/caps.c
> index 669d6e2..f9d73c3 100644
> --- a/src/daemon/caps.c
> +++ b/src/daemon/caps.c
> @@ -86,9 +86,10 @@ void pa_drop_caps(void) {
>      pa_assert_se(cap_clear(caps) == 0);
>      pa_assert_se(cap_set_proc(caps) == 0);
>      pa_assert_se(cap_free(caps) == 0);
> -#elif defined(__FreeBSD__)
> +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
>      /* FreeBSD doesn't have this functionality, even though sys/capability.h is
> -     * available. See https://bugs.freedesktop.org/show_bug.cgi?id=73967 */
> +     * available. See https://bugs.freedesktop.org/show_bug.cgi?id=72580 */
> +    pa_log_warn("FreeBSD cannot drop extra capabilities, implementation needed.");
>  #else
>  #error "Don't know how to do capabilities on your system.  Please send a patch."
>  #endif /* __linux__ */

Looks good to me.

-- 
Tanu



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux