stat.h在Linux中不可用?

时间:2010-02-15 16:13:02

标签: c linux file

当我在Linux中执行#include <stat.h>时,出现编译错误。我需要这个库用于S_IWRITE标志,而该标志又用于系统级IO的上下文。

在Linux中,stat.h不可用吗?

2 个答案:

答案 0 :(得分:2)

stat.h位于“sys”文件夹下,尝试从那里#include它或将其添加到包含目录列表中。

答案 1 :(得分:0)

来自man stat.h

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

SYNOPSIS
       #include <sys/stat.h>