문제

the following is my .h file

4 typedef struct pic_ pic_t; 
5 typedef int32_t status_t; 
6 typedef u_int16_t pic_id_t; 
7 typedef const char* (*pic_flavor_t) (pic_t *); 
8 typedef status_t (*pic_periodic_t) (pic_t *); 
9 typedef status_t (*pic_get_port_info_t) (pic_t *pic, u_int16_t link, void*info, Boolean*need_update); 
11 struct pic_ 
12 { 
13 u_int16_t   nic_slot; 
14 u_int16_t   pic_slot; 
15 u_int32_t   pic_flags; 
16 pic_id_t    pic_id; 
17 u_int16_t   pic_asic_type; 
18 u_int16_t   pic_firstport; 
19 pic_periodic_t  pic_periodic; 
20 pic_flavor_t    pic_flavor; 
21 pic_get_port_info_t pic_get_port_info; 
22 void *pic_context; 
23 };

And I'm getting the following error

../../../../../src/pfe/common/drivers/rpio/rpio_tunnel_pvt1.h:9: error: expected     declaration specifiers or '...' before 'boolean'

I have tried including also tried replacing booleand with bool and also with _bool still no help. someone please help me out here

도움이 되었습니까?

해결책

Neither Boolean nor boolean exist anywhere in the Linux kernel header files.

However, there is a bool defined in linux/types.h as

typedef _Bool           bool;

To access this, you must change boolean to bool and include linux/types.h in your source.

다른 팁

The compiler does not know what name Boolean denotes. You need to include the header where this name is defined in this header before referencing to Boolean

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top