summaryrefslogtreecommitdiffstats
path: root/net/softethervpn/patches/100-gcc14.patch
blob: 88271d908f6f38ef080de4ff0ba7123d42c103ed (plain)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
--- a/src/Mayaqua/Secure.c
+++ b/src/Mayaqua/Secure.c
@@ -417,11 +417,11 @@ bool SignSecByObject(SECURE *sec, SEC_OB
 	// Perform Signing
 	size = 128;
 	// First try with 1024 bit
-	ret = sec->Api->C_Sign(sec->SessionId, hash, sizeof(hash), dst, &size);
+	ret = sec->Api->C_Sign(sec->SessionId, hash, sizeof(hash), dst, (CK_ULONG*)&size);
 	if (ret != CKR_OK && 128 < size && size <= 4096/8)
 	{
 		// Retry with expanded bits
-		ret = sec->Api->C_Sign(sec->SessionId, hash, sizeof(hash), dst, &size);
+		ret = sec->Api->C_Sign(sec->SessionId, hash, sizeof(hash), dst, (CK_ULONG*)&size);
 	}
 	if (ret != CKR_OK || size == 0 || size > 4096/8)
 	{
@@ -474,7 +474,7 @@ bool WriteSecKey(SECURE *sec, bool priva
 	UINT key_type = CKK_RSA;
 	CK_BBOOL b_true = true, b_false = false, b_private_obj = private_obj;
 	UINT obj_class = CKO_PRIVATE_KEY;
-	UINT object;
+	CK_ULONG object;
 	UINT ret;
 	BUF *b;
 	RSA *rsa;
@@ -716,7 +716,7 @@ bool WriteSecCert(SECURE *sec, bool priv
 	UCHAR value[4096];
 	UINT ret;
 	BUF *b;
-	UINT object;
+	CK_ULONG object;
 	CK_ATTRIBUTE a[] =
 	{
 		{CKA_SUBJECT,			subject,		0},			// 0
@@ -1264,7 +1264,7 @@ LIST *CloneEnumSecObject(LIST *o)
 LIST *EnumSecObject(SECURE *sec)
 {
 	CK_BBOOL b_true = true, b_false = false;
-	UINT objects[MAX_OBJ];
+	CK_ULONG objects[MAX_OBJ];
 	UINT i;
 	UINT ret;
 	LIST *o;
@@ -1273,7 +1273,7 @@ LIST *EnumSecObject(SECURE *sec)
 	{
 		{CKA_TOKEN,		&b_true,		sizeof(b_true)},
 	};
-	UINT num_objects = MAX_OBJ;
+	CK_ULONG num_objects = MAX_OBJ;
 	// Validate arguments
 	if (sec == NULL)
 	{
@@ -1389,7 +1389,7 @@ bool WriteSecData(SECURE *sec, bool priv
 {
 	UINT object_class = CKO_DATA;
 	CK_BBOOL b_true = true, b_false = false, b_private_obj = private_obj;
-	UINT object;
+	CK_ULONG object;
 	CK_ATTRIBUTE a[] =
 	{
 		{CKA_TOKEN,		&b_true,		sizeof(b_true)},
@@ -1713,7 +1713,7 @@ void CloseSecSession(SECURE *sec)
 bool OpenSecSession(SECURE *sec, UINT slot_number)
 {
 	UINT err = 0;
-	UINT session;
+	CK_ULONG session;
 	// Validate arguments
 	if (sec == NULL)
 	{
@@ -1827,7 +1827,7 @@ SECURE *OpenSec(UINT id)
 
 	// Get the slot list
 	sec->NumSlot = 0;
-	if ((err = sec->Api->C_GetSlotList(true, NULL, &sec->NumSlot)) != CKR_OK || sec->NumSlot == 0)
+	if ((err = sec->Api->C_GetSlotList(true, NULL, (CK_ULONG*)&sec->NumSlot)) != CKR_OK || sec->NumSlot == 0)
 	{
 		// Failure
 		FreeSecModule(sec);
@@ -1837,7 +1837,7 @@ SECURE *OpenSec(UINT id)
 
 	sec->SlotIdList = (UINT *)ZeroMalloc(sizeof(UINT) * sec->NumSlot);
 
-	if (sec->Api->C_GetSlotList(TRUE, sec->SlotIdList, &sec->NumSlot) != CKR_OK)
+	if (sec->Api->C_GetSlotList(TRUE, (CK_ULONG*)sec->SlotIdList, (CK_ULONG*)&sec->NumSlot) != CKR_OK)
 	{
 		// Failure
 		Free(sec->SlotIdList);
--- a/src/Mayaqua/Unix.c
+++ b/src/Mayaqua/Unix.c
@@ -309,9 +309,8 @@ OS_DISPATCH_TABLE *UnixGetDispatchTable(
 	return &t;
 }
 
-static void *signal_received_for_ignore(int sig, siginfo_t *info, void *ucontext) 
+static void signal_received_for_ignore(int sig, siginfo_t *info, void *ucontext) 
 {
-	return NULL;
 }
 
 // Ignore the signal flew to the thread
--- a/src/Cedar/BridgeUnix.c
+++ b/src/Cedar/BridgeUnix.c
@@ -151,6 +151,7 @@ struct my_tpacket_auxdata
 #endif	// UNIX_LINUX
 
 static LIST *eth_offload_list = NULL;
+extern void FreeTap(VLAN *v);
 
 // Initialize
 void InitEth()
--- a/src/Cedar/Console.c
+++ b/src/Cedar/Console.c
@@ -104,6 +104,7 @@
 
 #include "CedarPch.h"
 
+extern int getch(void);
 
 // Display the help for the command
 void PrintCmdHelp(CONSOLE *c, char *cmd_name, TOKEN_LIST *param_list)