Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e0871de

Browse files
committed
PGPRO-3138: Added #undef open(a, b, c) for Windows build
1 parent 56736b1 commit e0871de

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/utils/file.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ typedef struct
3838
/* Convert FIO pseudo handle to index in file descriptor array */
3939
#define fio_fileno(f) (((size_t)f - 1) | FIO_PIPE_MARKER)
4040

41+
#if defined(WIN32)
42+
#undef open(a, b, c)
43+
#undef fopen(a, b)
44+
#endif
45+
4146
/* Use specified file descriptors as stdin/stdout for FIO functions */
4247
void fio_redirect(int in, int out, int err)
4348
{

0 commit comments

Comments
 (0)