Pergunta

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

Foi útil?

Solução

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.

Outras dicas

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top