Tuesday, May 19, 2009

fdatasync not found in bionic libc

fdatasync(int) declare is found in bionic/libc/include/unistd.h, but it is not actually implemented in libc. I can NOT find the fdatasync symbol in /system/lib/libc.so.

4 comments:

Unknown said...

I got the same problem. fdatasync() is declared. Where is its implementation?

rtm said...

I use fsync instead to pass through the build.

Unknown said...

You're right. I found the sample code from Google.
File ./external/sqlite/dist/sqlite3.c has the snippet:
/*
** Use the fdatasync() API only if the HAVE_FDATASYNC macro is
defined.
** Otherwise use fsync() in its place.
*/
#ifndef HAVE_FDATASYNC
# define fdatasync fsync
#endif

Reading ./bionic/libc/include/sys/linux-unistd.h (generated by Google as you mentioned), I found only fsync() was implemented.

sasha said...

Android OS based smartphones have been selling really well during the last few months, and some of the credit must go the large number of apps that are being created for android smartphones.

best android apps

best iphone apps