From owner-freebsd-ports@FreeBSD.ORG Tue Feb 2 07:10:34 2010 Return-Path: Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 618001065672 for ; Tue, 2 Feb 2010 07:10:34 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id E9DFC8FC12 for ; Tue, 2 Feb 2010 07:10:33 +0000 (UTC) Received: (qmail 14770 invoked by uid 399); 2 Feb 2010 07:10:33 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 2 Feb 2010 07:10:33 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4B67CFEF.1020107@FreeBSD.org> Date: Mon, 01 Feb 2010 23:10:39 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.7) Gecko/20100123 Thunderbird/3.0.1 MIME-Version: 1.0 To: "freebsd-ports@FreeBSD.org" X-Enigmail-Version: 1.0 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: posix_fallocate X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 07:10:34 -0000 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