]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/CCode/Source/Common/CommonLib.c
_filelength is a function of fd, not FILE *
[mirror_edk2.git] / Tools / CCode / Source / Common / CommonLib.c
index 618abd89bb7c53400406fa391751a41047aa231b..4ae5542b8bfa63e5d2111ebdb6e116d73d4bff66 100644 (file)
@@ -496,10 +496,10 @@ Returns:
 \r
 #ifdef __GNUC__\r
 \r
-size_t _filelength(FILE *file)\r
+size_t _filelength(int fd)\r
 {\r
   struct stat stat_buf;\r
-  fstat(fileno(file), &stat_buf);\r
+  fstat(fd, &stat_buf);\r
   return stat_buf.st_size;\r
 }\r
 \r