Added falloc.h in build_detect_platform
On Centos 6, you need to explicitely include linux/falloc.h which is whele the FALLOC_FL_* flags are defined. Otherwise, the fallocate() support test defined in build_detect_platform will fail. Signed-off-by: Pooya Shareghi <shareghi@gmail.com>
This commit is contained in:
parent
ff1ff7c624
commit
e8808b9128
@ -177,6 +177,7 @@ else
|
|||||||
# Test whether fallocate is available
|
# Test whether fallocate is available
|
||||||
$CXX $CFLAGS -x c++ - -o /dev/null 2>/dev/null <<EOF
|
$CXX $CFLAGS -x c++ - -o /dev/null 2>/dev/null <<EOF
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <linux/falloc.h>
|
||||||
int main() {
|
int main() {
|
||||||
int fd = open("/dev/null", 0);
|
int fd = open("/dev/null", 0);
|
||||||
fallocate(fd, FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE, 0, 1024);
|
fallocate(fd, FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE, 0, 1024);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user