_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
This commit is contained in:
@ -496,10 +496,10 @@ Returns:
|
|||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
|
|
||||||
size_t _filelength(FILE *file)
|
size_t _filelength(int fd)
|
||||||
{
|
{
|
||||||
struct stat stat_buf;
|
struct stat stat_buf;
|
||||||
fstat(fileno(file), &stat_buf);
|
fstat(fd, &stat_buf);
|
||||||
return stat_buf.st_size;
|
return stat_buf.st_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ PrintGuidToBuffer (
|
|||||||
#define _stricmp strcasecmp
|
#define _stricmp strcasecmp
|
||||||
#define strnicmp strncasecmp
|
#define strnicmp strncasecmp
|
||||||
#define strcmpi strcasecmp
|
#define strcmpi strcasecmp
|
||||||
size_t _filelength(FILE *file);
|
size_t _filelength(int fd);
|
||||||
#ifndef __CYGWIN__
|
#ifndef __CYGWIN__
|
||||||
char *strlwr(char *s);
|
char *strlwr(char *s);
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user