__syscall_error.c 408 B

12345678910111213141516
  1. /* Wrapper for setting errno.
  2. * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  3. *
  4. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  5. */
  6. #include <features.h>
  7. #include <errno.h>
  8. /* This routine is jumped to by all the syscall handlers, to stash
  9. * an error number into errno. */
  10. int attribute_hidden __syscall_error(int err_no)
  11. {
  12. __set_errno(-err_no);
  13. return -1;
  14. }