tags:

views:

87

answers:

2

When I do #include <stat.h> in Linux, I get a compiler error. I need this library for the S_IWRITE flag, which in its turn is used in the context of system-level IO.

Is stat.h unavailable in Linux?

+2  A: 

stat.h is available under the "sys" folder, try to #include it from there or add it to the list of include directories.

Otávio Décio
for clarification, include if from there means `#include <sys/stat.h>`, don't add it to your list of includes unless you really really have to though.
roe
@roe -thanks, that is correct.
Otávio Décio
A: 

From man stat.h:

NAME
       sys/stat.h - data returned by the stat() function

SYNOPSIS
       #include <sys/stat.h>
Ignacio Vazquez-Abrams