Bug #439
closed'fdatasync' is unavailable for 'platforms/android-8'
0%
Description
android-ndk-r8-crystax-1-windows-x86_64.zip
r8-crystax-1/platforms/android-8/arch-arm/usr/include/unistd.h
#if 0 /* MISSING FROM BIONIC /
extern pid_t getsid(pid_t);
extern int execvpe(const char *, char * const *, char * const *);
extern int execlpe(const char *, const char *, ...);
extern int getfsuid(uid_t);
extern int setfsuid(uid_t);
extern int fdatasync(int);
extern int getlogin_r(char name, size_t namesize);
extern int sethostname(const char , size_t);
extern int getdomainname(char *, size_t);
extern int setdomainname(const char *, size_t);
#endif / MISSING */
So when I try to compile any lib that uses 'fdatasync' I've got an error 'fdatasync is not defined at this scope'.
Updated by Dmitry M. over 10 years ago
Yes, fdatasync is unavailable in Bionic, thus it's not defined in system headers. The simplest workaround would be use fsync instead of fdatasync such as below:
#define fdatasync fsync
Nevertheless, thanks for report, we'll try to resolve it in our NDK, not requiring users make such workarounds.
Updated by Dmitry M. over 9 years ago
- Status changed from Open to Rejected
Closing as outdated; android-8 is not supported anymore. Workaround above could be still applied on user behalf though.