This repository was archived by the owner on Apr 12, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsoftethervpn-fix-implicit-declaration.patch
More file actions
66 lines (59 loc) · 2.17 KB
/
softethervpn-fix-implicit-declaration.patch
File metadata and controls
66 lines (59 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
From 180b47e47cc3d5dad12a0637debd1eaa2a2fd933 Mon Sep 17 00:00:00 2001
From: Davide Beatrici <[email protected]>
Date: Fri, 10 Aug 2018 21:21:19 +0200
Subject: [PATCH 1/2] VLanUnix: fix "implicit declaration of function
'FreeTap'" warning
In file included from /builds/SoftEther/SoftEtherVPN/src/Cedar/Bridge.c:130:0:
/builds/SoftEther/SoftEtherVPN/src/Cedar/BridgeUnix.c: In function 'CloseEth':
/builds/SoftEther/SoftEtherVPN/src/Cedar/BridgeUnix.c:1568:3: warning: implicit declaration of function 'FreeTap'; did you mean 'FreeCaps'? [-Wimplicit-function-declaration]
FreeTap(e->Tap);
^~~~~~~
FreeCaps
---
src/Cedar/VLanUnix.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/Cedar/VLanUnix.h b/src/Cedar/VLanUnix.h
index fa878e59..556aecda 100644
--- a/src/Cedar/VLanUnix.h
+++ b/src/Cedar/VLanUnix.h
@@ -122,6 +122,7 @@ struct VLAN
VLAN *NewVLan(char *instance_name, VLAN_PARAM *param);
VLAN *NewTap(char *name, char *mac_address);
void FreeVLan(VLAN *v);
+void FreeTap(VLAN *v);
CANCEL *VLanGetCancel(VLAN *v);
bool VLanGetNextPacket(VLAN *v, void **buf, UINT *size);
bool VLanPutPacket(VLAN *v, void *buf, UINT size);
--
2.39.3
From b4c8fa99be440db233a21df761d6ac1dff6a8f75 Mon Sep 17 00:00:00 2001
From: Davide Beatrici <[email protected]>
Date: Fri, 10 Aug 2018 21:22:36 +0200
Subject: [PATCH 2/2] 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
---
src/Cedar/Console.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/Cedar/Console.c b/src/Cedar/Console.c
index 3c6c90c2..e9087491 100644
--- a/src/Cedar/Console.c
+++ b/src/Cedar/Console.c
@@ -2039,7 +2039,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
--
2.39.3