summaryrefslogtreecommitdiff
path: root/bfd/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/cache.c')
-rw-r--r--bfd/cache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bfd/cache.c b/bfd/cache.c
index da16409d857..4e5ef2e3b40 100644
--- a/bfd/cache.c
+++ b/bfd/cache.c
@@ -364,7 +364,9 @@ bfd_cache_lookup_worker (abfd)
{
if (bfd_open_file (abfd) == NULL)
return NULL;
- if (fseek ((FILE *) abfd->iostream, abfd->where, SEEK_SET) != 0)
+ if (abfd->where != (unsigned long) abfd->where)
+ return NULL;
+ if (fseek ((FILE *) abfd->iostream, (long) abfd->where, SEEK_SET) != 0)
return NULL;
}