getsid.c 468 B

12345678910111213141516171819202122
  1. /*
  2. * getsid() 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 __USE_XOPEN_EXTENDED
  11. #define __NR___syscall_getsid __NR_getsid
  12. static __inline__ _syscall1(__kernel_pid_t, __syscall_getsid, __kernel_pid_t, pid)
  13. pid_t getsid(pid_t pid)
  14. {
  15. return (__syscall_getsid(pid));
  16. }
  17. libc_hidden_def(getsid)
  18. #endif