unlink.c 453 B

123456789101112131415161718192021
  1. /*
  2. * unlink() 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. #if defined __NR_unlinkat && !defined __NR_unlink
  11. # include <fcntl.h>
  12. int unlink(const char *pathname)
  13. {
  14. return unlinkat(AT_FDCWD, pathname, 0);
  15. }
  16. #else
  17. _syscall1(int, unlink, const char *, pathname)
  18. #endif
  19. libc_hidden_def(unlink)