fixup: Portable fileno()
This commit is contained in:
parent
86edeb6784
commit
a58b7ac6ce
@ -143,6 +143,15 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*-****************************************
|
||||||
|
* fileno() function
|
||||||
|
******************************************/
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
# define UTIL_fileno _fileno
|
||||||
|
#else
|
||||||
|
# define UTIL_fileno fileno
|
||||||
|
#endif
|
||||||
|
|
||||||
/* *************************************
|
/* *************************************
|
||||||
* Constants
|
* Constants
|
||||||
***************************************/
|
***************************************/
|
||||||
@ -384,7 +393,7 @@ UTIL_STATIC U64 UTIL_getOpenFileSize(FILE* file)
|
|||||||
int fd;
|
int fd;
|
||||||
struct UTIL_TYPE_stat statbuf;
|
struct UTIL_TYPE_stat statbuf;
|
||||||
|
|
||||||
fd = fileno(file);
|
fd = UTIL_fileno(file);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
perror("fileno");
|
perror("fileno");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user