[libvirt] [PATCH v2] build: fix build with libselinux 2.3

Eric Blake eblake at redhat.com
Wed May 28 18:25:21 UTC 2014


On 05/28/2014 11:38 AM, Eric Blake wrote:
> On 05/28/2014 06:44 AM, Cédric Bosdonnat wrote:
>> Several function signatures changed in libselinux 2.3, now taking
>> a 'const char *' instead of 'security_context_t'.  The latter is
>> defined in selinux/selinux.h as
>>
>>   typedef char *security_context_t;
>> ---

ACK to your version, after all.

>> +         [gt_cv_setcon_param='security_context'],
> 

> Typo - there is no 'security_context'.

I fixed that, and pushed your version.


> I'll still like to try and do a slicker macro that is either '' or
> 'const', because then...
> 

> ...here you would just need:
> 
> int setcon_raw(POSSIBLY_CONST char *context)
> 
> instead of #ifdefs.

My attempts to tweak this weren't panning out quickly enough, and yours
definitely fixes a build-breaker, while still working for me with
libselinux 2.2.  Thanks for stepping in and helping :)

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140528/e0b8c20c/attachment-0001.sig>


More information about the libvir-list mailing list