* Don't do the offset sanity check on non-seekable devices.

This commit is contained in:
Sam Hocevar
2007-01-16 14:06:57 +00:00
committed by sam
parent 404b37f643
commit 9cf80fa640
+3 -2
View File
@@ -169,10 +169,11 @@ static void offset_check(int fd)
{
/* Sanity check, can be OK though (for instance with a character device) */
#ifdef HAVE_LSEEK64
if(lseek64_orig(fd, 0, SEEK_CUR) != _zz_getpos(fd))
off64_t ret = lseek64_orig(fd, 0, SEEK_CUR);
#else
if(lseek_orig(fd, 0, SEEK_CUR) != _zz_getpos(fd))
off_t ret = lseek_orig(fd, 0, SEEK_CUR);
#endif
if(ret != -1 && ret != _zz_getpos(fd))
debug("warning: offset inconsistency");
}