diff options
Diffstat (limited to 'programs')
-rw-r--r-- | programs/util.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/programs/util.h b/programs/util.h index 6658bf9..2f3d0a8 100644 --- a/programs/util.h +++ b/programs/util.h @@ -143,6 +143,15 @@ extern "C" { #endif +/*-**************************************** +* fileno() function +******************************************/ +#if defined(_MSC_VER) +# define UTIL_fileno _fileno +#else +# define UTIL_fileno fileno +#endif + /* ************************************* * Constants ***************************************/ @@ -384,7 +393,7 @@ UTIL_STATIC U64 UTIL_getOpenFileSize(FILE* file) int fd; struct UTIL_TYPE_stat statbuf; - fd = fileno(file); + fd = UTIL_fileno(file); if (fd < 0) { perror("fileno"); exit(1); |