Bug 104525 - [PATCH] Fix ACL checks for FreeBSD
Summary: [PATCH] Fix ACL checks for FreeBSD
Status: RESOLVED FIXED
Alias: None
Product: Spice
Classification: Unclassified
Component: spice-gtk (show other bugs)
Version: unspecified
Hardware: Other FreeBSD
: medium normal
Assignee: Spice Bug List
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-07 10:29 UTC by Ting-Wei Lan
Modified: 2018-01-09 13:49 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
build-sys: Enable ACL support on FreeBSD (1.90 KB, patch)
2018-01-07 10:30 UTC, Ting-Wei Lan
Details | Splinter Review

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.