LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   expected specifier-qualifier-list ip.h (https://www.linuxquestions.org/questions/programming-9/expected-specifier-qualifier-list-ip-h-704155/)

quantt 02-12-2009 07:51 AM

expected specifier-qualifier-list ip.h
 
Hi all, I've got this error...
In file included from t.c:10:
ip.h:148: error: expected specifier-qualifier-list before 'n_time'
Below I posted scrap of code where it's defined.
Code:

147:    union ipt_timestamp {
148:            n_time ipt_time[1];
149:            struct ipt_ta {
150:                    struct in_addr ipt_addr;
151:                    n_time ipt_time;
152:            } ipt_ta[1] __attribute__((__packed__));
153:    } ipt_timestamp __attribute__((__packed__));
154:} __attribute__((__packed__));

I tried fixit like this, but take nothing positive effect.
Code:

typedef unsigned int n_time;
typedef u_int32_t n_time;

Tell me something how to improve it stiff.

Mara 02-12-2009 03:05 PM

Both your solutions should fix it. It works nicely with my example code. It may be a stupid question, but where do you add this typedef?


All times are GMT -5. The time now is 09:27 PM.