From 22982ae4a28e1dd96ab4a68a8ad96302df4e2dbb Mon Sep 17 00:00:00 2001 From: bbahnsen Date: Wed, 29 Nov 2006 21:03:11 +0000 Subject: _filelength is a function of fd, not FILE * git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2038 6f19259b-4bc3-4df7-8a09-765794883524 --- Tools/CCode/Source/Common/CommonLib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Tools/CCode/Source/Common/CommonLib.c') diff --git a/Tools/CCode/Source/Common/CommonLib.c b/Tools/CCode/Source/Common/CommonLib.c index 618abd89bb..4ae5542b8b 100644 --- a/Tools/CCode/Source/Common/CommonLib.c +++ b/Tools/CCode/Source/Common/CommonLib.c @@ -496,10 +496,10 @@ Returns: #ifdef __GNUC__ -size_t _filelength(FILE *file) +size_t _filelength(int fd) { struct stat stat_buf; - fstat(fileno(file), &stat_buf); + fstat(fd, &stat_buf); return stat_buf.st_size; } -- cgit v1.2.3