pal_android.h 936 B

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #include "il2cpp-config.h"
  3. #if IL2CPP_TARGET_ANDROID
  4. #define IL2CPP_USES_POSIX_CLASS_LIBRARY_PAL 1
  5. // On Android >= 23, strerror_r changed from POSIX to GNU variant.
  6. // see https://android.googlesource.com/platform/bionic/+/master/libc/include/string.h#140 for details.
  7. #if __ANDROID_API__ >= 23
  8. #define IL2CPP_HAVE_GNU_STRERROR_R 1
  9. #endif
  10. #define IL2CPP_HAVE_STAT_FLAGS 1
  11. #define IL2CPP_HAVE_LCHFLAGS 1
  12. #define IL2CPP_HAVE_FUTIMENS 1
  13. #define IL2CPP_HAVE_FIXED_SIZE_DIRENT 1
  14. #define IL2CPP_HAVE_STAT_TIM 1
  15. #include <sys/sendfile.h>
  16. #define IL2CPP_HAVE_SENDFILE_4 1
  17. #define IL2CPP_HAVE_SYS_UN 1
  18. // On Android, we are not allowed to modify permissions, but the copy should still succeed;
  19. // see https://github.com/mono/mono/issues/17133 for details.
  20. #define IL2CPP_CANNOT_MODIFY_FILE_PERMISSIONS 1
  21. #define stat_ stat
  22. #define fstat_ fstat
  23. #define lstat_ lstat
  24. #include <dirent.h>
  25. #endif // IL2CPP_TARGET_ANDROID