From 38deb14ee4f2a22b0e72f4f548872bd42335e9b8 Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Wed, 24 May 2017 02:43:43 +0300 Subject: [PATCH] test: fix STDERR_FILENO for MSVC. --- test/osal.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/osal.h b/test/osal.h index 29d52219..8f162635 100644 --- a/test/osal.h +++ b/test/osal.h @@ -31,3 +31,15 @@ int osal_delay(unsigned seconds); void osal_udelay(unsigned us); void osal_yield(void); bool osal_istty(int fd); + +#ifdef _MSC_VER +#ifndef STDIN_FILENO +#define STDIN_FILENO _fileno(stdin) +#endif +#ifndef STDOUT_FILENO +#define STDOUT_FILENO _fileno(stdout) +#endif +#ifndef STDERR_FILENO +#define STDERR_FILENO _fileno(stderr) +#endif +#endif /* _MSC_VER */