0010-portability.patch 790 B

12345678910111213141516171819202122232425262728293031323334353637
  1. --- a/squashfs-tools/xattr.c
  2. +++ b/squashfs-tools/xattr.c
  3. @@ -113,6 +113,7 @@ static int get_prefix(struct xattr_list
  4. static int read_xattrs_from_system(char *filename, struct xattr_list **xattrs)
  5. {
  6. +#if defined(linux)
  7. ssize_t size, vsize;
  8. char *xattr_names, *p;
  9. int i;
  10. @@ -222,6 +223,10 @@ failed:
  11. free(xattr_list);
  12. free(xattr_names);
  13. return 0;
  14. +#else
  15. + *xattrs = NULL;
  16. + return 0;
  17. +#endif
  18. }
  19. --- a/squashfs-tools/unsquashfs_xattr.c
  20. +++ b/squashfs-tools/unsquashfs_xattr.c
  21. @@ -34,6 +34,7 @@ extern int user_xattrs;
  22. void write_xattr(char *pathname, unsigned int xattr)
  23. {
  24. +#if defined(linux)
  25. unsigned int count;
  26. struct xattr_list *xattr_list;
  27. int i;
  28. @@ -136,4 +137,5 @@ void write_xattr(char *pathname, unsigne
  29. }
  30. free_xattr(xattr_list, count);
  31. +#endif
  32. }