]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commitdiff
Added falloc.h in build_detect_platform
authorPooya Shareghi <shareghi@gmail.com>
Tue, 14 Apr 2015 00:56:12 +0000 (17:56 -0700)
committerIgor Canadi <icanadi@fb.com>
Thu, 30 Apr 2015 02:20:54 +0000 (19:20 -0700)
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>
build_tools/build_detect_platform

index 9052e77bbd25f15135ddef58f38d1e158335bf55..9b6ab140087d5a44f4f18e087b09321d18ad9f56 100755 (executable)
@@ -177,6 +177,7 @@ else
     # Test whether fallocate is available
     $CXX $CFLAGS -x c++ - -o /dev/null 2>/dev/null  <<EOF
       #include <fcntl.h>
+      #include <linux/falloc.h>
       int main() {
        int fd = open("/dev/null", 0);
   fallocate(fd, FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE, 0, 1024);