diff --git a/include/libtorrent/file.hpp b/include/libtorrent/file.hpp index fc64a3f61..8a45a5b03 100644 --- a/include/libtorrent/file.hpp +++ b/include/libtorrent/file.hpp @@ -78,6 +78,9 @@ POSSIBILITY OF SUCH DAMAGE. #include #include #include // for DIR + +#undef _FILE_OFFSET_BITS + #endif namespace libtorrent diff --git a/src/file.cpp b/src/file.cpp index 9fdd780a3..593089269 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -101,6 +101,8 @@ static int my_fallocate(int fd, int mode, loff_t offset, loff_t len) #endif +#undef _FILE_OFFSET_BITS + // make sure the _FILE_OFFSET_BITS define worked // on this platform. It's supposed to make file // related functions support 64-bit offsets.