strerror.c 417 B

123456789101112131415161718192021
  1. /*
  2. * Copyright (C) 2002 Manuel Novoa III
  3. * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
  4. *
  5. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  6. */
  7. #include <features.h>
  8. #include <string.h>
  9. #include "_syserrmsg.h"
  10. char *strerror(int errnum)
  11. {
  12. static char buf[_STRERROR_BUFSIZE];
  13. __xpg_strerror_r(errnum, buf, sizeof(buf));
  14. return buf;
  15. }
  16. libc_hidden_def(strerror)