ambika
ambika

Reputation: 1683

C error expected specifier-qualifier-list before ‘time_t’

I got the error

from error.c:31:
/usr/include/ap/mas.h:254: error: expected specifier-qualifier-list before ‘time_t’
make: *** [error.o] Error 1

Feedback

We at least need to see line 31 of error.c and line 254 of mas.h, with preferably a few lines of context around each. This error may have nothing to do with how time_t is being declared. – John Bode

Then I check in error.c (line no 31) -- #include "mas.h" then I check line no 254 in mas.h.

in mas.h

#include <sys/types.h>
typedef struct _x{
  time_t time;
}x;

Can anybody suggest where I am going wrong?

Upvotes: 0

Views: 7404

Answers (2)

sth
sth

Reputation: 229583

Have you #included <time.h>?

Upvotes: 6

qrdl
qrdl

Reputation: 34958

You need to include time.h before including mas.h.

Upvotes: 1

Related Questions