Hi,

[ Sorry for answering so late. I discovered your e-mail by Googling to
try to solve another toolchain-related problem. ]

Le Thu, 26 Jun 2008 13:59:34 -0500,
E Robertson <[EMAIL PROTECTED]> a écrit :

> I'm creeping along here but this one is beyond me. I'm not familiar
> with fakeroot code. I check the include files (wrapfunc.inp) but not
> sure how to treat it. Are these errors relatively simple to fix? 
> 
> In file included from libfakeroot.c:25:
> communicate.h:157: warning: 'struct stat64' declared inside parameter
> list communicate.h:157: warning: its scope is only this definition or
> declaration, which is probably not what you want

The problem comes from the large file support. You need to tell
fakeroot when it is allowed to use stat64 and when it is not.

The following patch, to be applied at the root of sb-toolchain-extras,
solves this problem.

Sincerly,

Thomas

---

This patch adds a new patch to the fakeroot building process so that
fakeroot is aware of UClibc configuration regarding large file
support. If UClibc has been compiled with large file support, then
UCLIBC_HAS_LFS is defined, and we allow fakeroot to use
stat64. Otherwise, we prevent fakeroot from using stat64.

The condition on using stat64 or not already existed. This patch
simply extends it to support UClibc.

Signed-off-by: Thomas Petazzoni <[EMAIL PROTECTED]>

---
 device_tools/fakeroot/Makefile                         |    1 +
 device_tools/fakeroot/files/uclibc-no-stat64-fix.patch |   17 +++++++++++++++++
 2 files changed, 18 insertions(+)

Index: sb-toolchain-extras/device_tools/fakeroot/Makefile
===================================================================
--- sb-toolchain-extras.orig/device_tools/fakeroot/Makefile
+++ sb-toolchain-extras/device_tools/fakeroot/Makefile
@@ -29,6 +29,7 @@
 
 post-patch:
        patch -p1 -d $(WORKSRC) < files/communication.patch
+       patch -p1 -d $(WORKSRC) < files/uclibc-no-stat64-fix.patch
        $(MAKECOOKIE)
 
 pre-fetch:
Index: 
sb-toolchain-extras/device_tools/fakeroot/files/uclibc-no-stat64-fix.patch
===================================================================
--- /dev/null
+++ sb-toolchain-extras/device_tools/fakeroot/files/uclibc-no-stat64-fix.patch
@@ -0,0 +1,17 @@
+---
+ communicate.h |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: fakeroot-1.4.2/communicate.h
+===================================================================
+--- fakeroot-1.4.2.orig/communicate.h
++++ fakeroot-1.4.2/communicate.h
+@@ -35,7 +35,7 @@
+ #endif
+ 
+ /* Then decide whether we do or do not use the stat64 support */
+-#if defined(sun) || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
++#if defined(sun) || (!defined __UCLIBC__ && __GLIBC__ > 2) || (!defined 
__UCLIBC__ && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (defined __UCLIBC__ && 
defined UCLIBC_HAS_LFS)
+ # define STAT64_SUPPORT
+ #else
+ # warning Not using stat64 support


-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com
_______________________________________________
Scratchbox-users mailing list
Scratchbox-users@lists.scratchbox.org
http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users

Reply via email to