dirent64 is missing in bionic/libc/kernel/common/linux/dirent.h

by fadden » Tue, 28 Jul 2009 03:09:37 GMT


Sponsored Links
 


Can the code use plan old dirent rather than dirent64?

--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



dirent64 is missing in bionic/libc/kernel/common/linux/dirent.h

by Elvis Dowson » Tue, 28 Jul 2009 12:12:38 GMT


 Hi,       I encountered a similar error, see


Sponsored Links


dirent64 is missing in bionic/libc/kernel/common/linux/dirent.h

by louis » Thu, 30 Jul 2009 11:01:46 GMT


 Hi

To fadden,
I am not sure that using dirent instead of dirent64 will work without
any regression but  I will try.

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.

Another question is that is there any support for telldir and seekdir?
If not available, what should I do to add the replacements?

Best regards




> see



dirent64 is missing in bionic/libc/kernel/common/linux/dirent.h

by Elvis Dowson » Thu, 30 Jul 2009 12:43:13 GMT


 Hi,




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: Elvis Dowson <elvis.dow...@gmail.com>
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

--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



dirent64 is missing in bionic/libc/kernel/common/linux/dirent.h

by Jean-Baptiste Queru » Thu, 30 Jul 2009 21:05:02 GMT


 For reference, cupcake uses linux 2.6.27.

JBQ






-- 
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.

--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



Other Threads

1. My messages are not appearing? How to reach moderators?

Your first ever post takes a while to show, but after that it is pretty
instant.

Your post obviously showed up now.





How is this group moderated? I posted a msg and though I saw "your
mesage will appear in a few minutes" it never did. Now I see this is
moderated, but there is no way to reach the moderators as far as I can
tell. Moderators, please let me know what's going on.



--~--~---------~--~----~------------~-------~--~----~

2. How can a browser link to a search of application in the market?

Using G1, go to http://www.myspace.com. Notice the site is able to
detect the user agent from the browser and provides a link to search
the MySpace application on the Android Marketplace. Google's
http://code.google.com/android/devel/sign-publish.html#publishing
provides options to search, e.g. 
http://market.android.com/search?q=pname:<package>.
This does not work for me. Any help out there is appreciate.

--~--~---------~--~----~------------~-------~--~----~

3. Using ColorFilter to remove image background?

4. Basic example of a 2D game

5. Control MP3 player via bluetooth.

6. How to handle orientation changing of VideoView/MediaPlayer?

7. Printing values