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

Re: unable to include capability.h



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>

nasty...

cheers, kyle


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