pal_uid.cpp 432 B

123456789101112131415161718192021222324252627
  1. #include "il2cpp-config.h"
  2. #include "pal_platform.h"
  3. #if IL2CPP_USES_POSIX_CLASS_LIBRARY_PAL
  4. #include "pal_platform.h"
  5. #include <unistd.h>
  6. extern "C"
  7. {
  8. // Items needed by mscorlib
  9. IL2CPP_EXPORT uint32_t SystemNative_GetEUid(void);
  10. IL2CPP_EXPORT uint32_t SystemNative_GetEGid(void);
  11. }
  12. uint32_t SystemNative_GetEUid(void)
  13. {
  14. return geteuid_();
  15. }
  16. uint32_t SystemNative_GetEGid()
  17. {
  18. return getegid_();
  19. }
  20. #endif