100-llseek.patch 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. diff -ur util-linux.old/fdisk/llseek.c util-linux.dev/fdisk/llseek.c
  2. --- util-linux.old/fdisk/llseek.c 2003-07-13 23:13:33.000000000 +0200
  3. +++ util-linux.dev/fdisk/llseek.c 2006-12-14 23:06:12.000000000 +0100
  4. @@ -29,13 +29,7 @@
  5. static int _llseek (unsigned int, unsigned long,
  6. unsigned long, long long *, unsigned int);
  7. -#ifdef __NR__llseek
  8. -
  9. -static _syscall5(int,_llseek,unsigned int,fd,unsigned long,offset_high,
  10. - unsigned long, offset_low,long long *,result,
  11. - unsigned int, origin)
  12. -
  13. -#else
  14. +#ifndef __NR__llseek
  15. /* no __NR__llseek on compilation machine - might give it explicitly */
  16. static int _llseek (unsigned int fd, unsigned long oh,
  17. diff -ur util-linux.old/fdisk/sfdisk.c util-linux.dev/fdisk/sfdisk.c
  18. --- util-linux.old/fdisk/sfdisk.c 2005-01-04 23:31:57.000000000 +0100
  19. +++ util-linux.dev/fdisk/sfdisk.c 2006-12-14 23:05:41.000000000 +0100
  20. @@ -176,12 +176,6 @@
  21. #define use_lseek
  22. #endif
  23. -#ifndef use_lseek
  24. -static __attribute__used
  25. -_syscall5(int, _llseek, unsigned int, fd, ulong, hi, ulong, lo,
  26. - loff_t *, res, unsigned int, wh);
  27. -#endif
  28. -
  29. static int
  30. sseek(char *dev, unsigned int fd, unsigned long s) {
  31. loff_t in, out;
  32. diff -ur util-linux.old/partx/partx.c util-linux.dev/partx/partx.c
  33. --- util-linux.old/partx/partx.c 2004-08-23 22:13:27.000000000 +0200
  34. +++ util-linux.dev/partx/partx.c 2006-12-14 23:06:42.000000000 +0100
  35. @@ -339,9 +339,6 @@
  36. #ifdef NEED__llseek
  37. #include <linux/unistd.h> /* _syscall */
  38. -static
  39. -_syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo,
  40. - long long *, res, uint, wh);
  41. #endif
  42. static int
  43. diff -ur util-linux.old/fdisk/llseek.c util-linux.dev/fdisk/llseek.c
  44. --- util-linux.old/fdisk/llseek.c 2007-01-20 15:53:17.870636000 +0100
  45. +++ util-linux.dev/fdisk/llseek.c 2007-01-20 15:55:33.458024160 +0100
  46. @@ -32,7 +32,7 @@
  47. #ifndef __NR__llseek
  48. /* no __NR__llseek on compilation machine - might give it explicitly */
  49. -static int _llseek (unsigned int fd, unsigned long oh,
  50. +static int __llseek (unsigned int fd, unsigned long oh,
  51. unsigned long ol, long long *result,
  52. unsigned int origin) {
  53. errno = ENOSYS;
  54. @@ -41,17 +41,8 @@
  55. #endif
  56. -static long long my_llseek (unsigned int fd, long long offset,
  57. - unsigned int origin)
  58. -{
  59. - long long result;
  60. - int retval;
  61. -
  62. - retval = _llseek (fd, ((unsigned long long) offset) >> 32,
  63. - ((unsigned long long) offset) & 0xffffffff,
  64. - &result, origin);
  65. - return (retval == -1 ? (long long) retval : result);
  66. -}
  67. +extern long long llseek(unsigned int fd, long long offset, unsigned int origin);
  68. +#define my_llseek llseek
  69. #endif /* __alpha__ */