-
Declaring struct problem
Hi,
I'm learning how to use semaphore under linux, but I'm having an error when I declare a struct I never had under windows.
error: redefinition of 'struct sembuf'
Code:
typedef struct sembuf
{
unsigned short sem_num;
short sem_op;
short sem_flg;
}sembuf;
int main()
{
sembuf* sbuf;
}
I searched the linux board but I can't find a solution for this error.
Some help would be appreciated.
-
sembuf must have been defined in one of the headers you included in your program.
-
It worked, I changed sembuf for test and it work.
Thx a lot for the fast reply.