falloc build fix
This commit is contained in:
@@ -76,7 +76,6 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include <linux/fiemap.h>
|
#include <linux/fiemap.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <linux/falloc.h>
|
|
||||||
#include <asm/unistd_64.h> // For __NR_fallocate
|
#include <asm/unistd_64.h> // For __NR_fallocate
|
||||||
|
|
||||||
// circumvent the lack of support in glibc
|
// circumvent the lack of support in glibc
|
||||||
@@ -1449,7 +1448,7 @@ namespace libtorrent
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#elif defined TORRENT_LINUX
|
#elif defined TORRENT_LINUX
|
||||||
int ret = my_fallocate(m_fd, FALLOC_FL_KEEP_SIZE, 0, s);
|
int ret = my_fallocate(m_fd, 0, 0, s);
|
||||||
if (ret == 0 && errno != ENOSYS) return true;
|
if (ret == 0 && errno != ENOSYS) return true;
|
||||||
if (ret != EOPNOTSUPP) ec.assign(ret, get_posix_category());
|
if (ret != EOPNOTSUPP) ec.assign(ret, get_posix_category());
|
||||||
// if fallocate failed, we have to use posix_fallocate
|
// if fallocate failed, we have to use posix_fallocate
|
||||||
|
Reference in New Issue
Block a user