关于找不到struct flock的定义
在学习GNU/LINUX编程指南,第11章,使用fcntl函数,
#include <unistd.h>
#include <fcntl.h>
int fcntl(int fd, int cmd);
int fcntl(int fd, int cmd, long arg);
int fcntl(int fd, int cmd, struct flock *lock);
最后一个的函数的第三个参数,struct flock找不到定义
他的例子程序编译出错
struct flock lock;//说他error: `lcok' undeclared (first use in this function)
头文件都加了啊,还有,碰到这样的问题一般怎么解决?