From a53ac7ad5c26b5dca0f3e3bc38cb5ff400d09f0a Mon Sep 17 00:00:00 2001 From: vitaut Date: Thu, 19 Mar 2015 07:39:24 -0700 Subject: [PATCH] Workaround mingw bugs --- test/posix-test.cc | 2 +- test/posix-test.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/test/posix-test.cc b/test/posix-test.cc index d4f0ddf3..e3061240 100644 --- a/test/posix-test.cc +++ b/test/posix-test.cc @@ -175,7 +175,7 @@ int test::fclose(FILE *stream) { return ::fclose(stream); } -int test::fileno(FILE *stream) { +int (test::fileno)(FILE *stream) { EMULATE_EINTR(fileno, -1); return ::FMT_POSIX(fileno(stream)); } diff --git a/test/posix-test.h b/test/posix-test.h index 17bf0c97..7afbbbe8 100644 --- a/test/posix-test.h +++ b/test/posix-test.h @@ -72,8 +72,7 @@ int pipe(int *pfds, unsigned psize, int textmode); FILE *fopen(const char *filename, const char *mode); int fclose(FILE *stream); -int fileno(FILE *stream); - +int (fileno)(FILE *stream); } // namespace test #define FMT_SYSTEM(call) test::call