getuid.c 555 B

1234567891011121314151617181920212223242526
  1. /*
  2. * getuid() for uClibc
  3. *
  4. * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  5. *
  6. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  7. */
  8. #include <sys/syscall.h>
  9. #include <unistd.h>
  10. #ifdef __NR_getxuid
  11. # undef __NR_getuid
  12. # define __NR_getuid __NR_getxuid
  13. #endif
  14. #ifdef __NR_getuid32
  15. # undef __NR_getuid
  16. # define __NR_getuid __NR_getuid32
  17. #endif
  18. _syscall_noerr0(uid_t, getuid)
  19. libc_hidden_def(getuid)
  20. #if !defined __NR_geteuid32 && !defined __NR_geteuid
  21. strong_alias(getuid,geteuid)
  22. libc_hidden_def(geteuid)
  23. #endif