0004-fix-musl-build-off-t.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. Use off_t instead of __off_t
  2. __off_t is an internal C library type, which shouldn't be used by
  3. applications. It is not defined by the musl C library, so use the
  4. public off_t type instead.
  5. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  6. Index: b/ftpfs.c
  7. ===================================================================
  8. --- a/ftpfs.c
  9. +++ b/ftpfs.c
  10. @@ -687,7 +687,7 @@
  11. return ftpfs_getattr(path, &sbuf);
  12. }
  13. -static __off_t test_size(const char* path)
  14. +static off_t test_size(const char* path)
  15. {
  16. struct stat sbuf;
  17. int err = ftpfs_getattr(path, &sbuf);
  18. @@ -950,7 +950,7 @@
  19. /* fix openoffice problem, truncating exactly to file length */
  20. - __off_t size = (long long int)test_size(path);
  21. + off_t size = (long long int)test_size(path);
  22. DEBUG(1, "ftpfs_truncate: %s check filesize=%lld\n", path, (long long int)size);
  23. if (offset == size)
  24. @@ -978,7 +978,7 @@
  25. }
  26. /* fix openoffice problem, truncating exactly to file length */
  27. - __off_t size = test_size(path);
  28. + off_t size = test_size(path);
  29. DEBUG(1, "ftpfs_ftruncate: %s check filesize=%lld\n", path, (long long int)size);
  30. if (offset == size)