Wednesday, June 9, 2010

Android NDK Differences with Linux

  • C++ STL is not included Update: stlport is included since revision 5
  • In <mntent.h>, function setmntent() does not exist
  • In <dirent.h>, functions seekdir(), telldir() does not exist
  • Macro INET_ADDRSTRLEN is not defined in <netinet/in.h> Update: added since revision 5b
  • Macro PTHREAD_EXPLICIT_SCHED is not defined in <pthread.h>
  • Marcos WEXITSTATUS, WTERMSIG, WIFSIGNALED, etc are only defined in <sys/wait.h>  (One can also find them in <stdlib.h>  for Linux)
  • Although function ftruncate64() is included in header <unistd.h>, it is not included in the prebuilt libraries. Hence it causes linking error while this function is used
  • Although you can include <sys/sysinfo.h>, struct sysinfo does not exist (it is disabled in the header file). If you have to use it, try this way.

No comments:

Post a Comment