diff --git a/vfs/ChangeLog b/vfs/ChangeLog index a4be215617..15f7a175fc 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -1,3 +1,9 @@ +2007-04-26 Pavel Tsekov + + * fish.c (fish_linear_start): Use _FILE_OFFSET_BITS to determine which + length modifier to pass to sscanf(). Use 'll' length modifier instead + of 'L' since 'L' is meant for doubles. + 2006-11-09 Jindrich Novy * fish.c (fish_file_store): Fix copy of file names with backticks to diff --git a/vfs/fish.c b/vfs/fish.c index 4fe36b777a..6eb2e30576 100644 --- a/vfs/fish.c +++ b/vfs/fish.c @@ -639,7 +639,11 @@ fish_linear_start (struct vfs_class *me, struct vfs_s_fh *fh, off_t offset) if (offset != PRELIM) ERRNOR (E_REMOTE, 0); fh->linear = LS_LINEAR_OPEN; fh->u.fish.got = 0; - if (sscanf( reply_str, "%Lu", &fh->u.fish.total )!=1) +#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 + if (sscanf( reply_str, "%llu", &fh->u.fish.total )!=1) +#else + if (sscanf( reply_str, "%u", &fh->u.fish.total )!=1) +#endif ERRNOR (E_REMOTE, 0); return 1; }