test-onvif-client: STDIN_FILENO is not portable

If not defined, define it to _fileno(stdin) on Windows, 0
everywhere else
This commit is contained in:
Mathieu Duponchelle 2019-08-08 15:52:53 +02:00
parent df1f9f38ce
commit 859e59b944

View file

@ -539,6 +539,14 @@ io_callback (GIOChannel * io, GIOCondition condition, Context * ctx)
return ret;
}
#ifndef STDIN_FILENO
#ifdef G_OS_WIN32
#define STDIN_FILENO _fileno(stdin)
#else /* !G_OS_WIN32 */
#define STDIN_FILENO 0
#endif /* G_OS_WIN32 */
#endif /* STDIN_FILENO */
static void
prompt_on (Context * ctx)
{