Skip to contentSkip to conversation

package/softether: fix various build errors

PATCH Superseded Thomas Perale via buildroot 1 participant 3 messages Jul 9, 2025 – Aug 10, 2025

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/softether: fix various build errors

This patch add several upstream patches that fix build error we are experiencing on the autobuilder related to host-gcc15 and gcc14.

- 0010-use-bool-from-stdbool.patch

Fix a host-gcc15 error with C23 bool reserved keyword when building host-softether package. This appeared on the autobuilder.

```
                 from Cfg.c:116:
../../src/Mayaqua/MayaType.h:257:33: error: 'bool' cannot be defined via 'typedef'
  257 | typedef unsigned int            bool;
      |                                 ^~~~
../../src/Mayaqua/MayaType.h:257:33: note: 'bool' is a keyword with '-std=c23' onwards
../../src/Mayaqua/MayaType.h:257:1: warning: useless type name in empty declaration
  257 | typedef unsigned int            bool;
      | ^~~~~~~
```

- 0011-fix-implicit-declaration-of-function-getch.patch

Fix an implicit function declaration.

- 0012-vlanunix-fix-implicit-declaration-of-function-freetap.patch

Fix an implicit function declaration.

- 0013-fix-build-on-freebsd-version-140091.patch

Incompatible pointer type which appeared on the autobuilder as well:

```
Unix.c: In function 'UnixIgnoreSignalForThread':
Unix.c:324:25: error: assignment to 'void (*)(int,  siginfo_t *, void *)' from incompatible pointer type 'void * (*)(int,  siginfo_t *, void *)' [-Wincompatible-pointer-types]
  324 |         sa.sa_sigaction = signal_received_for_ignore;
      |                         ^
```

- 0014-cedar-hub-properly-set-value-for-hub-admin-options.patch

Fix an incompatible pointer type error.

- 0015-adjust-types-of-variables.patch

Fix an incompatible pointer type error which appeared on the autobuilder as well.

```
Secure.c: In function 'OpenSec':
Secure.c:1829:56: error: passing argument 3 of 'sec->Api->C_GetSlotList' from incompatible pointer type [-Wincompatible-pointer-types]
 1829 |         if ((err = sec->Api->C_GetSlotList(true, NULL, &sec->NumSlot)) != CKR_OK || sec->NumSlot == 0)
      |                                                        ^~~~~~~~~~~~~
      |                                                        |
      |                                                        UINT * {aka unsigned int *}
```

- 0016-Cedar-Proto_IKE-fix-too-many-arguments-to-function-N.patch

Fix a function call.

---
Hi,

This packages hasn't been bumped since 2019 & no-one is following it on the DEVELOPERS list. Given the increasing number of patches and difficulty to maintain it, I think it's a good candidate to be removed.

Let me know what you think.

Regards,
Thomas.

---
 .../0010-use-bool-from-stdbool.patch          | 167 +++++++++++++++
 ...plicit-declaration-of-function-getch.patch |  34 +++
 ...icit-declaration-of-function-freetap.patch |  31 +++
 ...-fix-build-on-freebsd-version-140091.patch |  55 +++++
 ...erly-set-value-for-hub-admin-options.patch | 193 ++++++++++++++++++
 .../0015-adjust-types-of-variables.patch      |  93 +++++++++
 ...fix-too-many-arguments-to-function-N.patch |  54 +++++
 7 files changed, 627 insertions(+)
 create mode 100644 package/softether/0010-use-bool-from-stdbool.patch
 create mode 100644 package/softether/0011-fix-implicit-declaration-of-function-getch.patch
 create mode 100644 package/softether/0012-vlanunix-fix-implicit-declaration-of-function-freetap.patch
 create mode 100644 package/softether/0013-fix-build-on-freebsd-version-140091.patch
 create mode 100644 package/softether/0014-cedar-hub-properly-set-value-for-hub-admin-options.patch
 create mode 100644 package/softether/0015-adjust-types-of-variables.patch
 create mode 100644 package/softether/0016-Cedar-Proto_IKE-fix-too-many-arguments-to-function-N.patch
package/softether/0010-use-bool-from-stdbool.patch new file +167 -0
new file mode 100644
index 0000000000..d88dc8e203
@@ -0,0 +1,167 @@
+From 914bfe7d44f8e693d21178055f0b845c613dc777 Mon Sep 17 00:00:00 2001
+From: Davide Beatrici <[email protected]>
+Date: Sun, 28 Feb 2021 06:04:11 +0100
+Subject: [PATCH] Use bool from stdbool.h, get rid of BOOL
+
+BOOL was just an alias for bool, this commit replaces all instances of it for consistency.
+
+For some reason bool was defined as a 4-byte integer instead of a 1-byte one, presumably to match WinAPI's definition: https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types
+Nothing should break now that bool is 1-byte, as no protocol code appears to be relying on the size of the data type.
+PACK, for example, explicitly stores boolean values as 4-byte integers.
+
+This commit can be seen as a follow-up to 61ccaed4f6c1bba53202a6d10841fd78b8b6cf8.
+
+Upstream: https://github.com/SoftEtherVPN/SoftEtherVPN/commit/914bfe7d44f8e693d21178055f0b845c613dc777
+Signed-off-by: Thomas Perale <[email protected]>
+---
+ src/Cedar/Cedar.h         | 4 ----
+ src/Cedar/Command.c       | 2 +-
+ src/Cedar/Connection.h    | 2 +-
+ src/Cedar/EtherLog.h      | 2 +-
+ src/Cedar/Radius.c        | 2 +-
+ src/Cedar/Win32Com.cpp    | 2 --
+ src/Cedar/Win32Com.h      | 6 ------
+ src/Cedar/WinJumpList.cpp | 3 ---
+ src/Mayaqua/MayaType.h    | 9 ++-------
+ 9 files changed, 6 insertions(+), 26 deletions(-)
+
+diff --git a/src/Cedar/Cedar.h b/src/Cedar/Cedar.h
+index cc32fc28..267b3957 100644
+--- a/src/Cedar/Cedar.h
++++ b/src/Cedar/Cedar.h
+@@ -121,10 +121,6 @@
+ 
+ #endif	// VPN_SPEED
+ 
+-#define	bool	UINT
+-#define	BOOL	UINT
+-
+-
+ // Version number
+ #define	CEDAR_VER					430
+ 
+diff --git a/src/Cedar/Command.c b/src/Cedar/Command.c
+index 5b2c67e8..7bd19799 100644
+--- a/src/Cedar/Command.c
++++ b/src/Cedar/Command.c
+@@ -22433,7 +22433,7 @@ void CtEscapeCsv(wchar_t *dst, UINT size, wchar_t *src){
+ 	UINT i;
+ 	UINT len = UniStrLen(src);
+ 	UINT idx;
+-	BOOL need_to_escape = false;
++	bool need_to_escape = false;
+ 	wchar_t tmp[2]=L"*";
+ 
+ 	// Check the input value
+diff --git a/src/Cedar/Connection.h b/src/Cedar/Connection.h
+index 2b1f8091..47b2e4aa 100644
+--- a/src/Cedar/Connection.h
++++ b/src/Cedar/Connection.h
+@@ -244,7 +244,7 @@ struct UDP
+ // Data block
+ struct BLOCK
+ {
+-	BOOL Compressed;				// Compression flag
++	bool Compressed;				// Compression flag
+ 	UINT Size;						// Block size
+ 	UINT SizeofData;				// Data size
+ 	UCHAR *Buf;						// Buffer
+diff --git a/src/Cedar/EtherLog.h b/src/Cedar/EtherLog.h
+index 3fdcf140..e3dda9da 100644
+--- a/src/Cedar/EtherLog.h
++++ b/src/Cedar/EtherLog.h
+@@ -148,7 +148,7 @@ struct RPC_ENUM_DEVICE
+ // License status of the service
+ struct RPC_EL_LICENSE_STATUS
+ {
+-	BOOL Valid;								// Enable flag
++	bool Valid;								// Enable flag
+ 	UINT64 SystemId;						// System ID
+ 	UINT64 SystemExpires;					// System expiration date
+ };
+diff --git a/src/Cedar/Radius.c b/src/Cedar/Radius.c
+index bcbac5d4..9dcfe05d 100644
+--- a/src/Cedar/Radius.c
++++ b/src/Cedar/Radius.c
+@@ -1889,7 +1889,7 @@ bool RadiusLogin(CONNECTION *c, char *server, UINT port, UCHAR *secret, UINT sec
+ 			SOCK *sock;
+ 			USHORT sz = 0;
+ 			UINT pos = 0;
+-			BOOL *finish = ZeroMallocEx(sizeof(BOOL) * LIST_NUM(ip_list), true);
++			bool *finish = ZeroMallocEx(sizeof(bool) * LIST_NUM(ip_list), true);
+ 
+ 			Zero(tmp, sizeof(tmp));
+ 
+diff --git a/src/Cedar/Win32Com.cpp b/src/Cedar/Win32Com.cpp
+index e567c557..65c21988 100644
+--- a/src/Cedar/Win32Com.cpp
++++ b/src/Cedar/Win32Com.cpp
+@@ -106,8 +106,6 @@
+ 
+ #ifdef	WIN32
+ 
+-#define	WIN32COM_CPP
+-
+ #define _WIN32_DCOM
+ 
+ //#define	_WIN32_WINNT		0x0502
+diff --git a/src/Cedar/Win32Com.h b/src/Cedar/Win32Com.h
+index 6191d7e0..eb4810e4 100644
+--- a/src/Cedar/Win32Com.h
++++ b/src/Cedar/Win32Com.h
+@@ -105,12 +105,6 @@
+ #ifndef	WIN32COM_H
+ #define	WIN32COM_H
+ 
+-#ifdef	WIN32COM_CPP
+-
+-// Internal function
+-
+-#endif	// WIN32COM_CPP
+-
+ // For external function
+ 
+ #pragma comment(lib,"htmlhelp.lib")
+diff --git a/src/Cedar/WinJumpList.cpp b/src/Cedar/WinJumpList.cpp
+index 7bd375a1..7b5fabe2 100644
+--- a/src/Cedar/WinJumpList.cpp
++++ b/src/Cedar/WinJumpList.cpp
+@@ -132,9 +132,6 @@
+ #undef StrCmp
+ #endif
+ 
+-
+-#define	WIN32COM_CPP
+-
+ //#define	_WIN32_WINNT		0x0502
+ //#define	WINVER				0x0502
+ #include <winsock2.h>
+diff --git a/src/Mayaqua/MayaType.h b/src/Mayaqua/MayaType.h
+index ae173617..9d5bc3c1 100644
+--- a/src/Mayaqua/MayaType.h
++++ b/src/Mayaqua/MayaType.h
+@@ -105,6 +105,8 @@
+ #ifndef	MAYATYPE_H
+ #define	MAYATYPE_H
+ 
++#include <stdbool.h>
++
+ // Check whether the windows.h header is included
+ #ifndef	WINDOWS_H
+ #ifdef	_WINDOWS_
+@@ -252,13 +254,6 @@ typedef	unsigned int		BOOL;
+ #define	FALSE				0
+ #endif	// WINDOWS_H
+ 
+-// bool type
+-#ifndef	WIN32COM_CPP
+-typedef	unsigned int		bool;
+-#define	true				1
+-#define	false				0
+-#endif	// WIN32COM_CPP
+-
+ // 32bit integer type
+ #ifndef	WINDOWS_H
+ typedef	unsigned int		UINT;
+-- 
+2.39.5
package/softether/0011-fix-implicit-declaration-of-function-getch.patch new file +34 -0
new file mode 100644
index 0000000000..2fe34b8ed5
@@ -0,0 +1,34 @@
+From 84c44fbe243dabc91d4fa25f2ba878dcaca9856e Mon Sep 17 00:00:00 2001
+From: Davide Beatrici <[email protected]>
+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 <[email protected]>
+---
+ 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
package/softether/0012-vlanunix-fix-implicit-declaration-of-function-freetap.patch new file +31 -0
new file mode 100644
index 0000000000..a611340aa3
@@ -0,0 +1,31 @@
+From 49ed8770b87af46d92091464ecf41ae9b5027cd7 Mon Sep 17 00:00:00 2001
+From: Davide Beatrici <[email protected]>
+Date: Fri, 10 Aug 2018 21:21:19 +0200
+Subject: [PATCH] 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
+
+Upstream: https://github.com/SoftEtherVPN/SoftEtherVPN/commit/49ed8770b87af46d92091464ecf41ae9b5027cd7
+Signed-off-by: Thomas Perale <[email protected]>
+---
+ src/Cedar/VLanUnix.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/Cedar/VLanUnix.h b/src/Cedar/VLanUnix.h
+index b628dcd4f..89ae9c2d8 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);
package/softether/0013-fix-build-on-freebsd-version-140091.patch new file +55 -0

55 lines not on this page · raw message

package/softether/0014-cedar-hub-properly-set-value-for-hub-admin-options.patch new file +193 -0

193 lines not on this page · raw message

package/softether/0015-adjust-types-of-variables.patch new file +93 -0

93 lines not on this page · raw message

package/softether/0016-Cedar-Proto_IKE-fix-too-many-arguments-to-function-N.patch new file +54 -0

54 lines not on this page · raw message

Signature · 6 lines
2.50.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 3 lines · On Wed, 9 Jul 2025 22:07:36 +0200 Thomas Perale via buildroot…

This packages hasn't been bumped since 2019 & no-one is following it on the DEVELOPERS list. Given the increasing number of patches and difficulty to maintain it, I think it's a good candidate to be removed.

Totally agree.

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Hello Thomas, All,

Le 09/07/2025 à 23:13, Thomas Petazzoni via buildroot a écrit :

Quoted 8 lines
Quoted 3 lines · On Wed, 9 Jul 2025 22:07:36 +0200 Thomas Perale via buildroot…

This packages hasn't been bumped since 2019 & no-one is following it on the DEVELOPERS list. Given the increasing number of patches and difficulty to maintain it, I think it's a good candidate to be removed.

Totally agree.

Agree, especially since first patches were added back in 2014. Also Bernd doesn't use it since 2023 [1].
softether doesn't have any CPE identifiers, so we don't know how many CVEs affect this package.

[1]
https://gitlab.com/buildroot.org/buildroot/-/commit/2b6ea18e47c88b899ac45d8e60d3a7bc2f983d66

Best regards,
Romain

Quoted 2 lines

Thomas

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot