writer.o does not compile with -ansi
Closed this issue · 1 comments
nuno-silva commented
$ make writer.o
gcc -Wall -ansi -c -o writer.o writer.c
writer.c:13:35: error: ‘S_IRUSR’ undeclared here (not in a function)
static const int writer_f_mode = S_IRUSR | S_IWUSR | S_IROTH;
writer.c:13:46: error: ‘S_IWUSR’ undeclared here (not in a function)
static const int writer_f_mode = S_IRUSR | S_IWUSR | S_IROTH;
writer.c:13:56: error: ‘S_IROTH’ undeclared here (not in a function)
static const int writer_f_mode = S_IRUSR | S_IWUSR | S_IROTH;
make: *** [writer.o] Error 1
Using gcc version 4.8.2.
iluxonchik commented
Issue fixed.
The file was missing an include:
#include <sys/stat.h>