patch-src_io_c 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. --- dosfstools-3.0.26.orig/src/io.c 2014-01-17 07:07:14.000000000 +0100
  2. +++ dosfstools-3.0.26/src/io.c 2014-05-17 08:59:02.559708625 +0200
  3. @@ -48,7 +48,7 @@
  4. typedef struct _change {
  5. void *data;
  6. - loff_t pos;
  7. + off_t pos;
  8. int size;
  9. struct _change *next;
  10. } CHANGE;
  11. @@ -60,7 +60,7 @@ unsigned device_no;
  12. #ifdef __DJGPP__
  13. #include "volume.h" /* DOS lowlevel disk access functions */
  14. -loff_t llseek(int fd, loff_t offset, int whence)
  15. +off_t llseek(int fd, off_t offset, int whence)
  16. {
  17. if ((whence != SEEK_SET) || (fd == 4711))
  18. return -1; /* only those supported */
  19. @@ -72,9 +72,9 @@ loff_t llseek(int fd, loff_t offset, int
  20. #define read(a,b,c) ReadVolume(b,c)
  21. #define write(a,b,c) WriteVolume(b,c)
  22. #else
  23. -loff_t llseek(int fd, loff_t offset, int whence)
  24. +off_t llseek(int fd, off_t offset, int whence)
  25. {
  26. - return (loff_t) lseek64(fd, (off64_t) offset, whence);
  27. + return (off_t) lseek64(fd, (off64_t) offset, whence);
  28. }
  29. #endif
  30. @@ -118,7 +118,7 @@ void fs_open(char *path, int rw)
  31. * @param[in] size Number of bytes to read
  32. * @param[out] data Where to put the data read
  33. */
  34. -void fs_read(loff_t pos, int size, void *data)
  35. +void fs_read(off_t pos, int size, void *data)
  36. {
  37. CHANGE *walk;
  38. int got;
  39. @@ -145,7 +145,7 @@ void fs_read(loff_t pos, int size, void
  40. }
  41. }
  42. -int fs_test(loff_t pos, int size)
  43. +int fs_test(off_t pos, int size)
  44. {
  45. void *scratch;
  46. int okay;
  47. @@ -158,7 +158,7 @@ int fs_test(loff_t pos, int size)
  48. return okay;
  49. }
  50. -void fs_write(loff_t pos, int size, void *data)
  51. +void fs_write(off_t pos, int size, void *data)
  52. {
  53. CHANGE *new;
  54. int did;