statfs64 and !LFS

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Wed Oct 21 16:12:06 UTC 2009


On Wed, Oct 21, 2009 at 06:05:34PM +0200, Bernhard Reutner-Fischer wrote:
>On Wed, Oct 21, 2009 at 06:07:12PM +0400, Dmitry V. Levin wrote:
>>Hi,
>>
>>On Wed, Oct 14, 2009 at 04:46:24PM +0200, Bernhard Reutner-Fischer wrote:
>>> With this patchlet i'm able to build on a uClibc setup with LFS off.
>>
>>> --- a/acinclude.m4
>>> +++ b/acinclude.m4
>>[...]
>>> +	AC_DEFINE([HAVE_STATFS64], 1,
>>[...]
>>> --- a/file.c
>>> +++ b/file.c
>>[...]
>>> -#ifdef LINUX
>>> +#if defined LINUX && defined HAVE_STATFS64
>>[...]
>>> --- a/syscall.c
>>> +++ b/syscall.c
>>[...]
>>> +#ifndef HAVE_STAT64
>>
>>You haven't tried your patch on a system with LFS support, have you?
>
>I tried it both with and without LFS support and both work as expected
>with the patch.

Note that the check for HAVE_STAT64 did exist previously.
Here's the changelog again (same as the earlier one in this thread):

2009-10-14  Bernhard Reutner-Fischer  <rep.dot.nop at gmail.com>

	* acinclude.m4 (AC_STATFS64): New macro to check for struct
	statfs64.
	* configure.ac: Call AC_STATFS64.
	* file.c (printstatfs64, sys_statfs64, sys_fstatfs64): Only
	build if struct statfs64 is available.

2009-10-14  Bernhard Reutner-Fischer  <rep.dot.nop at gmail.com>

	* syscall.c (sys_truncate64, sys_ftruncate64, sys_getdents64,
	sys_statfs64, sys_fstatfs64): Define to their !LFS counterparts
	if largefilesupport is unavailable.

i.e. two things:
- statfs is linux specific and may not exist at all
- if !LFS then the !64 syscalls are used

Ok?




More information about the Strace-devel mailing list