Fix fread() to return a correct value on platforms where sizeof(int) !=

sizeof(size_t), i.e. on all 64-bit platforms.

Reported by:	Andrey V. Elsukov
MFC after:	3 days
This commit is contained in:
Ruslan Ermilov 2008-12-01 14:33:34 +00:00
parent 5c83795371
commit e95f37bb69

View file

@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$");
size_t
fread(void * __restrict buf, size_t size, size_t count, FILE * __restrict fp)
{
int ret;
size_t ret;
FLOCKFILE(fp);
ret = __fread(buf, size, count, fp);