006-ubifs-utils-journal-Include-sys-stat.h.patch 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. From 173f9714c8da1d685bfa951d43b9310d16bbab3c Mon Sep 17 00:00:00 2001
  2. From: Fabio Estevam <[email protected]>
  3. Date: Wed, 19 Feb 2025 10:02:42 -0300
  4. Subject: ubifs-utils: journal: Include <sys/stat.h>
  5. Include the <sys/stat.h> header file to fix the following error
  6. when building with musl:
  7. | ../git/ubifs-utils/libubifs/journal.c: In function 'ubifs_get_dent_type':
  8. | ../git/ubifs-utils/libubifs/journal.c:414:24: error: 'S_IFMT' undeclared (first use in this function)
  9. | 414 | switch (mode & S_IFMT) {
  10. | | ^~~~~~
  11. | ../git/ubifs-utils/libubifs/journal.c:414:24: note: each undeclared identifier is reported only once for each function it appears in
  12. | ../git/ubifs-utils/libubifs/journal.c:415:14: error: 'S_IFREG' undeclared (first use in this function)
  13. | 415 | case S_IFREG:
  14. Signed-off-by: Fabio Estevam <[email protected]>
  15. Reviewed-by: Zhihao Cheng <[email protected]>
  16. Signed-off-by: David Oberhollenzer <[email protected]>
  17. ---
  18. ubifs-utils/libubifs/journal.c | 1 +
  19. 1 file changed, 1 insertion(+)
  20. --- a/ubifs-utils/libubifs/journal.c
  21. +++ b/ubifs-utils/libubifs/journal.c
  22. @@ -46,6 +46,7 @@
  23. * all the nodes.
  24. */
  25. +#include <sys/stat.h>
  26. #include "bitops.h"
  27. #include "kmem.h"
  28. #include "ubifs.h"