[PATCH] libc: add fallocate() and fallocate64()

Anthony G. Basile basile at opensource.dyc.edu
Sat Sep 6 23:44:21 UTC 2014


On 09/04/14 07:48, Bernhard Reutner-Fischer wrote:
> On 1 September 2014 16:27,  <basile at opensource.dyc.edu> wrote:
>> From: "Anthony G. Basile" <blueness at gentoo.org>
>>
>> We add the Linux-specific system call fallocate() which allows the user to
>
> Please only enable the non-hidden symbol if UCLIBC_LINUX_SPECIFIC is set.
> Also, you seem to completely ignore the type of the function decl. You should
> make sure the fallocate decl is visible when being compiled with _LIBC (i.e.
> internally) and use extern __typeof(fallocate) _fallocate in the impl. We would
> potentially miss changed function "signature" otherwise..
> TIA,
>

Bernhard, thanks, it took me a bit but I see how to do it now.  I'm 
working on the patch because I also want to add tests for fallocates 
mode = FALLOC_FL_KEEP_SIZE and FALLOC_FL_PUNCH_HOLE.

However, in testing with UCLIBC_LINUX_SPECIFIC unset, I hit an error 
with statfs's libc_hidden_def/proto stuff:

libc/sysdeps/linux/common/statfs.c:51:1: error: '__EI_statfs' aliased to 
undefined symbol '__GI_statfs'
make: *** [libc/sysdeps/linux/common/statfs.os] Error 1
make: *** Waiting for unfinished jobs....

The fix is trivial.  I'm sending a patch in my next email.

-- 
Anthony G. Basile, Ph. D.
Chair of Information Technology
D'Youville College
Buffalo, NY 14201
(716) 829-8197


More information about the uClibc mailing list