| 12345678910111213141516171819202122232425262728293031323334 |
- From 84c44fbe243dabc91d4fa25f2ba878dcaca9856e Mon Sep 17 00:00:00 2001
- From: Davide Beatrici <davidebeatrici@gmail.com>
- Date: Fri, 10 Aug 2018 21:22:36 +0200
- Subject: [PATCH] Console.c: fix "implicit declaration of function 'getch'"
- warning
- /builds/SoftEther/SoftEtherVPN/src/Cedar/Console.c: In function 'PasswordPrompt':
- /builds/SoftEther/SoftEtherVPN/src/Cedar/Console.c:2051:8: warning: implicit declaration of function 'getch'; did you mean 'getc'? [-Wimplicit-function-declaration]
- c = getch();
- ^~~~~
- getc
- Upstream: https://github.com/SoftEtherVPN/SoftEtherVPN/commit/84c44fbe243dabc91d4fa25f2ba878dcaca9856e
- Signed-off-by: Thomas Perale <thomas.perale@mind.be>
- ---
- src/Cedar/Console.c | 4 ++++
- 1 file changed, 4 insertions(+)
- diff --git a/src/Cedar/Console.c b/src/Cedar/Console.c
- index ec861a4ed..2c384facf 100644
- --- a/src/Cedar/Console.c
- +++ b/src/Cedar/Console.c
- @@ -2048,7 +2048,11 @@ bool PasswordPrompt(char *password, UINT size)
- else if (c == 0xE0)
- {
- // Read one more character
- +#ifdef OS_WIN32
- c = getch();
- +#else // OS_WIN32
- + c = getc(stdin);
- +#endif // OS_WIN32
- if (c == 0x4B || c == 0x53)
- {
- // Backspace
|