__syscall_error.c 304 B

123456789101112131415
  1. /* Wrapper for setting errno.
  2. *
  3. * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  4. *
  5. * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  6. */
  7. #include <errno.h>
  8. #include <sys/syscall.h>
  9. int __syscall_error(int err_no)
  10. {
  11. __set_errno(-err_no);
  12. return -1;
  13. }