coreutils.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. --- src/stat.c.orig Sun Dec 1 10:48:21 2002
  2. +++ src/stat.c Sun Jan 12 11:30:01 2003
  3. @@ -43,6 +43,12 @@
  4. # endif
  5. #endif
  6. +/* FreeBSD 5.0 need this for struct statfs */
  7. +#if HAVE_SYS_MOUNT_H
  8. +# include <sys/param.h>
  9. +# include <sys/mount.h>
  10. +#endif
  11. +
  12. #include "system.h"
  13. #include "closeout.h"
  14. --- src/test.c.orig Wed Sep 25 10:22:37 2002
  15. +++ src/test.c Sun Jan 12 11:49:50 2003
  16. @@ -151,7 +151,7 @@
  17. and don't make the mistake of telling root that any file is executable.
  18. But this loses when the containing filesystem is mounted e.g. read-only. */
  19. static int
  20. -eaccess (char *path, int mode)
  21. +myeaccess (char *path, int mode)
  22. {
  23. struct stat st;
  24. static uid_t euid = -1;
  25. @@ -645,17 +645,17 @@
  26. case 'r': /* file is readable? */
  27. unary_advance ();
  28. - value = -1 != eaccess (argv[pos - 1], R_OK);
  29. + value = -1 != myeaccess (argv[pos - 1], R_OK);
  30. return (TRUE == value);
  31. case 'w': /* File is writable? */
  32. unary_advance ();
  33. - value = -1 != eaccess (argv[pos - 1], W_OK);
  34. + value = -1 != myeaccess (argv[pos - 1], W_OK);
  35. return (TRUE == value);
  36. case 'x': /* File is executable? */
  37. unary_advance ();
  38. - value = -1 != eaccess (argv[pos - 1], X_OK);
  39. + value = -1 != myeaccess (argv[pos - 1], X_OK);
  40. return (TRUE == value);
  41. case 'O': /* File is owned by you? */