unable to include capability.h
Daniel Lezcano
daniel.lezcano at free.fr
Fri Jun 12 13:02:39 UTC 2009
Kyle McMartin wrote:
> On Fri, Jun 12, 2009 at 01:48:15PM +0200, Daniel Lezcano wrote:
>
>> In file included from /usr/include/sys/capability.h:23,
>> from myinclude.c:1:
>> /usr/include/stdint.h:41: error: conflicting types for ?int64_t?
>> /usr/include/linux/types.h:98: note: previous declaration of ?int64_t?
>> was here
>> /usr/include/stdint.h:56: error: conflicting types for ?uint64_t?
>> /usr/include/linux/types.h:96: note: previous declaration of ?uint64_t?
>> was here
>> make: *** [myinclude] Error 1
>>
>>
>
> <sys/capability.h> is /still/ broken. there was a bug filed against the
> kernel, but the problem is actually the userspace header, which 'cheats'
> the preprocessor rather badly:
>
> #include <linux/types.h>
> #include <stdint.h>
>
> /*
> * Make sure we can be included from userland by preventing
> * capability.h from including other kernel headers
> */
> #define _LINUX_TYPES_H
> #define _LINUX_FS_H
> #define __LINUX_COMPILER_H
> #define __user
>
> typedef unsigned int __u32;
> typedef __u32 __le32;
>
> #include <linux/capability.h>
>
Grumf ! that's annoying :(
Thank you very much for your quick answer ! :)
As I only need the CAP_SYS_BOOT, I will define it manually in the source
code and will remove the include, that's ugly but anyway... :/
As I understood, the fix in the kernel conflicts with the workaround in
userspace, right ?
I was wondering if I should notify this to the maintainer of the libcap
or is it already known ?
Thanks
-- Daniel
More information about the fedora-devel-list
mailing list