Bug 104525

Summary: [PATCH] Fix ACL checks for FreeBSD
Product: Spice Reporter: Ting-Wei Lan <lantw44>
Component: spice-gtkAssignee: Spice Bug List <spice-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: lantw44, teuf
Version: unspecified   
Hardware: Other   
OS: FreeBSD   
Whiteboard:
i915 platform: i915 features:
Attachments: build-sys: Enable ACL support on FreeBSD

Description Ting-Wei Lan 2018-01-07 10:29:26 UTC
FreeBSD doesn't have acl/libacl.h. We can easily fix this problem by replacing acl/libacl.h with sys/acl.h, which works on both FreeBSD and Linux.

FreeBSD doesn't have libacl because ACL functions are already available in libc. Linking with -lacl causes the check to fail because libacl cannot be found.
Comment 1 Ting-Wei Lan 2018-01-07 10:30:44 UTC
Created attachment 136596 [details] [review]
build-sys: Enable ACL support on FreeBSD

sys/acl.h works on both FreeBSD and Linux, so we should use it instead
of acl/libacl.h, which only works on Linux.

FreeBSD puts ACL functions in libc, so we should check whether ACL
functions are available in libc before doing the check with -lacl.
Comment 2 Christophe Fergeau 2018-01-08 11:30:45 UTC
Sent upstream
https://lists.freedesktop.org/archives/spice-devel/2018-January/041325.html
but it looks good to me, so I'll push it soon.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.