Ignore:
Timestamp:
Nov 12, 2008, 3:59:30 AM (13 years ago)
Author:
charles
Message:

(libT) better testing for fallocate() on linux

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/fdlimit.c

    r7051 r7098  
    3737#endif
    3838
     39#ifdef HAVE_FALLOCATE
     40 #include <linux/falloc.h>
     41#endif
     42
    3943#include <sys/types.h>
    4044#include <sys/stat.h>
     
    105109#ifdef HAVE_FALLOCATE
    106110
    107     return fallocate( fd, 0, offset, length );
     111    return fallocate( fd, FALLOC_FL_KEEP_SIZE, 0, length );
    108112
    109113#elif defined(HAVE_POSIX_FALLOCATE)
Note: See TracChangeset for help on using the changeset viewer.