make[3]: Entering directory `/usr/local/src/pkg/libtorrent/src/libtorrent/src/data' /bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I./.. -I../.. -march=native -mtune=native -O2 -pipe -DNDEBUG -fvisibility=hidden -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -MT socket_file.lo -MD -MP -MF .deps/socket_file.Tpo -c -o socket_file.lo socket_file.cc libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I./.. -I../.. -march=native -mtune=native -O2 -pipe -DNDEBUG -fvisibility=hidden -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -MT socket_file.lo -MD -MP -MF .deps/socket_file.Tpo -c socket_file.cc -fPIC -DPIC -o .libs/socket_file.o socket_file.cc:101: error: prototype for 'bool torrent::SocketFile::reserve(uint64_t, uint64_t)' does not match any in class 'torrent::SocketFile' socket_file.h:70: error: candidate is: bool torrent::SocketFile::reserve(uint64_t, uint64_t) const make[3]: *** [socket_file.lo] Error 1 Index: src/data/socket_file.cc =================================================================== --- src/data/socket_file.cc (Revision 1072) +++ src/data/socket_file.cc (Arbeitskopie) @@ -100,7 +100,7 @@ bool SocketFile::reserve(RESERVE_PARAM uint64_t offset, RESERVE_PARAM uint64_t length) { #ifdef USE_XFS - struct xfs_flock64 flock; + struct ::xfs_flock64 flock; flock.l_whence = SEEK_SET; flock.l_start = offset; @@ -134,6 +134,9 @@ if (!is_open()) throw internal_error("SocketFile::set_size() called on a closed file"); + if (!reserve(0, size)) + throw internal_error("SocketFile::reserve() failed"); + if (ftruncate(m_fd, size) == 0) return true; Index: src/data/socket_file.h =================================================================== --- src/data/socket_file.h (Revision 1072) +++ src/data/socket_file.h (Arbeitskopie) @@ -67,7 +67,7 @@ // Reserve the space on disk if a system call is defined. 'length' // of zero indicates to the end of the file. - bool reserve(uint64_t offset = 0, uint64_t length = 0); + bool reserve(uint64_t offset = 0, uint64_t length = 0) const; bool is_open() const { return m_fd != invalid_fd; } Index: configure.ac =================================================================== --- configure.ac (Revision 1072) +++ configure.ac (Arbeitskopie) @@ -43,7 +43,7 @@ TORRENT_ENABLE_ARCH TORRENT_WITH_SYSROOT -dnl TORRENT_WITH_XFS +TORRENT_WITH_XFS TORRENT_WITH_KQUEUE TORRENT_WITHOUT_EPOLL TORRENT_WITH_POSIX_FALLOCATE