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

Very hackish bugfix for:
$ echo foobar | grep foobar /etc/passwd -
grep: lseek: Illegal seek
--- ./src/grep.c.orig 2007-11-09 15:05:44.000000000 +0100
+++ ./src/grep.c 2007-11-09 15:17:23.000000000 +0100
@@ -463,8 +463,9 @@
bufoffset = lseek (fd, 0, SEEK_CUR);
if (bufoffset < 0)
{
- error (0, errno, "lseek");
- return 0;
+ goto lseek_failed_hack;
+ // error (0, errno, "lseek");
+ // return 0;
}
}
#if defined(HAVE_MMAP)
@@ -474,6 +475,7 @@
}
else
{
+lseek_failed_hack:;
#if defined(HAVE_MMAP)
bufmapped = 0;
#endif