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.


Kenny said...

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

rtm said...

I use fsync instead to pass through the build.

Kenny 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
** Otherwise use fsync() in its place.
# define fdatasync fsync

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