sfdisk.005.no-llseek-fix.patch 773 B

123456789101112131415161718192021
  1. diff -ur sfdisk_vanilla/sfdisk.c sfdisk_llseek-fix/sfdisk.c
  2. --- sfdisk_vanilla/sfdisk.c 2004-01-13 13:03:11.000000000 +0000
  3. +++ sfdisk_llseek-fix/sfdisk.c 2008-04-17 08:42:35.000000000 +0000
  4. @@ -134,9 +137,17 @@
  5. * Note: we use 512-byte sectors here, irrespective of the hardware ss.
  6. */
  7. #if defined(__linux__) && !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) && !defined (__s390x__)
  8. +#if defined(_llseek)
  9. static
  10. _syscall5(int, _llseek, unsigned int, fd, ulong, hi, ulong, lo,
  11. loff_t *, res, unsigned int, wh);
  12. +#else
  13. +static int _llseek (unsigned int fd, unsigned long oh,
  14. + unsigned long ol, long long *result,
  15. + unsigned int origin) {
  16. + return syscall (__NR__llseek, fd, oh, ol, result, origin);
  17. +#endif
  18. +}
  19. #endif
  20. static int