编译时我得到错误:
cc holetest.c -o holetest
holetest.c: In function ‘test_seek’:
holetest.c:48:19: error: ‘SEEK_HOLE’ undeclared (first use in this function)
holetest.c:48:19: note: each undeclared identifier is reported only once for each function it appears in
holetest.c:51:19: error: ‘SEEK_DATA’ undeclared (first use in this function)
make: *** [holetest] Error 1
Run Code Online (Sandbox Code Playgroud)
如果我删除SEEK_HOLE和SEEK_DATA,我没有任何问题.
我错过了包含或图书馆吗?
Makefile文件:
all: holetest
holetest: holetest.c
rm -f holetest
gcc holetest.c -o holetest
Run Code Online (Sandbox Code Playgroud)
holetest.c:
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#define FILENAME …Run Code Online (Sandbox Code Playgroud)