0002-struct-stat-is-not-posix-conformant-on-microblaze-wi.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From 87d415cc133ff493ccd02464c061cb171d11ef2f Mon Sep 17 00:00:00 2001
  2. From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>
  3. Date: Mon, 25 Jul 2022 11:25:15 +0200
  4. Subject: [PATCH] struct stat is not posix conformant on microblaze with
  5. __USE_FILE_OFFSET64
  6. Commit a06b40cdf5ba0d2ab4f9b4c77d21e45ff284fac7 updated stat.h to use
  7. __USE_XOPEN2K8 instead of __USE_MISC to add the st_atim, st_mtim and
  8. st_ctim members to struct stat. However, for microblaze, there are two
  9. definitions of struct stat, depending on the __USE_FILE_OFFSET64 macro.
  10. The second one was not updated.
  11. Change __USE_MISC to __USE_XOPEN2K8 in the __USE_FILE_OFFSET64 version
  12. of struct stat for microblaze.
  13. Upstream: https://sourceware.org/bugzilla/show_bug.cgi?id=29403
  14. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
  15. ---
  16. sysdeps/unix/sysv/linux/microblaze/bits/struct_stat.h | 2 +-
  17. 1 file changed, 1 insertion(+), 1 deletion(-)
  18. diff --git a/sysdeps/unix/sysv/linux/microblaze/bits/struct_stat.h b/sysdeps/unix/sysv/linux/microblaze/bits/struct_stat.h
  19. index a2787e88343..850697f4fa6 100644
  20. --- a/sysdeps/unix/sysv/linux/microblaze/bits/struct_stat.h
  21. +++ b/sysdeps/unix/sysv/linux/microblaze/bits/struct_stat.h
  22. @@ -89,7 +89,7 @@ struct stat
  23. __blksize_t st_blksize; /* Optimal block size for I/O. */
  24. int __pad3;
  25. __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
  26. -# ifdef __USE_MISC
  27. +# ifdef __USE_XOPEN2K8
  28. /* Nanosecond resolution timestamps are stored in a format
  29. * equivalent to 'struct timespec'. This is the type used
  30. * whenever possible but the Unix namespace rules do not allow the
  31. --
  32. 2.35.3