mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
596 B

  1. Very hackish bugfix for:
  2. $ echo foobar | grep foobar /etc/passwd -
  3. grep: lseek: Illegal seek
  4. --- ./src/grep.c.orig 2007-11-09 15:05:44.000000000 +0100
  5. +++ ./src/grep.c 2007-11-09 15:17:23.000000000 +0100
  6. @@ -463,8 +463,9 @@
  7. bufoffset = lseek (fd, 0, SEEK_CUR);
  8. if (bufoffset < 0)
  9. {
  10. - error (0, errno, "lseek");
  11. - return 0;
  12. + goto lseek_failed_hack;
  13. + // error (0, errno, "lseek");
  14. + // return 0;
  15. }
  16. }
  17. #if defined(HAVE_MMAP)
  18. @@ -474,6 +475,7 @@
  19. }
  20. else
  21. {
  22. +lseek_failed_hack:;
  23. #if defined(HAVE_MMAP)
  24. bufmapped = 0;
  25. #endif