For reference, cupcake uses linux 2.6.27. JBQ
On Wed, Jul 29, 2009 at 9:42 PM, Elvis Dowson<[email protected]> wrote: > Hi, > >> >> To Elvis >> There is similar structure in my cupcake source tree: "struct >> linux_dirent64" defined in kernel/include/linux/dirent.h is almost >> same to dirent64 defined in bionic/libc/kernel/common/linux/dirent.h. >> How can I sure that dirent64 is supported in bionic of current cupcake >> source tree. > > Yes, I had encountered it too, and it probably is a result of an evolution > of the linux kernel. The original bionic libraries in the android-sdk-1.5_r3 > libraries did not have that entry. > Which linux kernel version does cupcake correspond to? > In any case, while porting bionic libc to v2.6.31 kernel version (trouble > shooting some DSS2 display issues with android at the moment), I encountered > the same this and applied the following patch, renamed two variables in the > linux_dirent64 struct, so that compilation could proceed. I don't think > android requires linux_dirent64, but just leave it there anyway, and apply > the following patch. > From a46a655e29ebffca36dc37775f9bc7ce96b5d226 Mon Sep 17 00:00:00 2001 > From: Elvis Dowson <[email protected]> > Date: Sun, 26 Jul 2009 00:06:54 +0400 > Subject: [PATCH] libc: Re-import dirent and direct64 entries into > bionic/libc/kernel/common/linux/dirent.h > --- > libc/kernel/common/linux/dirent.h | 19 +++++++++++++++++-- > 1 files changed, 17 insertions(+), 2 deletions(-) > diff --git a/libc/kernel/common/linux/dirent.h > b/libc/kernel/common/linux/dirent.h > index 7799fe3..3f8628f 100644 > --- a/libc/kernel/common/linux/dirent.h > +++ b/libc/kernel/common/linux/dirent.h > @@ -12,9 +12,24 @@ > #ifndef _LINUX_DIRENT_H > #define _LINUX_DIRENT_H > > +struct dirent { > +long d_ino; > +__kernel_off_t d_off; > + unsigned short d_reclen; > + char d_name[256]; > +}; > + > +struct dirent64 { > + __u64 d_ino; > + __s64 d_off; > + unsigned short d_reclen; > + unsigned char d_type; > + char d_name[256]; > +}; > + > struct linux_dirent64 { > - u64 d_ino; > - s64 d_off; > + __u64 d_ino; > + __s64 d_off; > unsigned short d_reclen; > unsigned char d_type; > char d_name[0]; > -- > 1.6.0.3 > Best regards, > Elvis > > > > -- Jean-Baptiste M. "JBQ" Queru Software Engineer, Android Open-Source Project, Google. Questions sent directly to me that have no reason for being private will likely get ignored or forwarded to a public forum with no further warning. --~--~---------~--~----~------------~-------~--~----~ unsubscribe: [email protected] website: http://groups.google.com/group/android-porting -~----------~----~----~----~------~----~------~--~---
