]> mj.ucw.cz Git - libucw.git/blobdiff - lib/fb-mmap.c
Fastbufs now work better on unseekable files.
[libucw.git] / lib / fb-mmap.c
index 85dc27ee2c10566e4d77d222acad39e87d495a4c..41e65832653c8c16180920d78172bc6221428e63 100644 (file)
@@ -117,7 +117,7 @@ bfmm_spout(struct fastbuf *f)
   DBG(" -> %p %p %p(%x) %p", f->buffer, f->bptr, f->bstop, (int)f->pos, f->bufend);
 }
 
-static void
+static int
 bfmm_seek(struct fastbuf *f, sh_off_t pos, int whence)
 {
   if (whence == SEEK_END)
@@ -128,6 +128,7 @@ bfmm_seek(struct fastbuf *f, sh_off_t pos, int whence)
   f->pos = pos;
   f->bptr = f->bstop = f->bufend;      /* force refill/spout call */
   DBG("Seek -> %p %p %p(%x) %p", f->buffer, f->bptr, f->bstop, (int)f->pos, f->bufend);
+  return 1;
 }
 
 static void