Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Feb 2010 23:10:39 -0800
From:      Doug Barton <dougb@FreeBSD.org>
To:        "freebsd-ports@FreeBSD.org" <freebsd-ports@FreeBSD.org>
Subject:   posix_fallocate
Message-ID:  <4B67CFEF.1020107@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
I'm working on the port of the 0.15 version of rblibtorrent 
(http://sourceforge.net/projects/qbittorrent/files/qbittorrent-unstable/libtorrent-rasterbar-0.15.svn.r4203.tar.gz/download?use_mirror=heanet) 
and ran into a snag with the following:

   int ret = posix_fallocate(m_fd, 0, s);

The only reference in /usr/include is:

/usr/include/fcntl.h: * XXX missing posix_fadvise() and 
posix_fallocate(), and POSIX_FADV_* macros.
/usr/include/sys/fcntl.h: * XXX missing posix_fadvise() and 
posix_fallocate(), and POSIX_FADV_* macros.

No references at all in /usr/local/include.

There is another block of code that could be a solution, but it doesn't 
look promising either:

#ifdef F_PREALLOCATE
   fstore_t f = {F_ALLOCATECONTIG, F_PEOFPOSMODE, 0, s, 0};
   if (fcntl(m_fd, F_PREALLOCATE, &f) < 0)
   {
       ec = error_code(errno, get_posix_category());
       return false;
   }



So, any suggestions?  :)


Doug

-- 

	Improve the effectiveness of your Internet presence with
	a domain name makeover!    http://SupersetSolutions.com/

	Computers are useless. They can only give you answers.
			-- Pablo Picasso




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B67CFEF.1020107>