softethervpn: Fix compilation under 64-bit targets
authorRosen Penev <rosenp@gmail.com>
Mon, 1 Apr 2019 19:43:37 +0000 (12:43 -0700)
committerRosen Penev <rosenp@gmail.com>
Mon, 29 Jul 2019 03:32:37 +0000 (20:32 -0700)
-m64 is not compatible with OpenWrt's compilers.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry-picked from 23134b07de24cce815c4c1f0f700393ada69a33e)

net/softethervpn/Makefile
net/softethervpn/patches/103-noeucjp.patch
net/softethervpn/patches/110-no-m64.patch [new file with mode: 0644]

index 14c32224740f78159c44d8ea7d296abab2040d1d..9619c537773fdf0f5f879a8f39f3b7b4e6ccae91 100644 (file)
@@ -12,7 +12,7 @@ PKG_NAME:=softethervpn
 PKG_VERSION:=4.29-9680
 PKG_VERREL:=rtm
 PKG_VERDATE:=2019.02.28
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=softether-src-v$(PKG_VERSION)-$(PKG_VERREL).tar.gz
 PKG_SOURCE_URL:=http://www.softether-download.com/files/softether/v$(PKG_VERSION)-$(PKG_VERREL)-$(PKG_VERDATE)-tree/Source_Code/
index f403dfb128792f7779655918831abeb550d92b1c..b1e338cfc0e9f6fe395c04e1860814a6cc0f616a 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/Mayaqua/Internat.c
 +++ b/src/Mayaqua/Internat.c
-@@ -123,7 +123,7 @@
+@@ -114,7 +114,7 @@
  #include <Mayaqua/Mayaqua.h>\r
  \r
  extern LOCK *token_lock;\r
@@ -9,7 +9,7 @@
  static LOCK *iconv_lock = NULL;\r
  void *iconv_cache_wide_to_str = 0;\r
  void *iconv_cache_str_to_wide = 0;\r
-@@ -938,7 +938,7 @@ void InitInternational()
+@@ -929,7 +929,7 @@ void InitInternational()
  #ifdef        UNIX_MACOS\r
                StrCpy(charset, sizeof(charset), "utf-8");\r
  #else // UNIX_MACOS\r
@@ -18,7 +18,7 @@
  #endif        // UNIX_MACOS\r
                d = IconvWideToStrInternal();\r
                if (d == (void *)-1)\r
-@@ -1198,7 +1198,7 @@ void GetCurrentCharSet(char *name, UINT
+@@ -1189,7 +1189,7 @@ void GetCurrentCharSet(char *name, UINT
                }\r
                else\r
                {\r
diff --git a/net/softethervpn/patches/110-no-m64.patch b/net/softethervpn/patches/110-no-m64.patch
new file mode 100644 (file)
index 0000000..ed21e14
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/src/makefiles/linux_64bit.mak
++++ b/src/makefiles/linux_64bit.mak
+@@ -66,9 +66,9 @@ OPTIONS_COMPILE_DEBUG=-D_DEBUG -DDEBUG -DUNIX -DUNIX_LINUX -DCPU_64 -D_REENTRANT
+ OPTIONS_LINK_DEBUG=-g -fsigned-char -m64 -lm -ldl -lrt -lpthread -lssl -lcrypto -lreadline -lncurses -lz
+-OPTIONS_COMPILE_RELEASE=-DNDEBUG -DVPN_SPEED -DUNIX -DUNIX_LINUX -DCPU_64 -D_REENTRANT -DREENTRANT -D_THREAD_SAFE -D_THREADSAFE -DTHREAD_SAFE -DTHREADSAFE -D_FILE_OFFSET_BITS=64 -I./src/ -I./src/Cedar/ -I./src/Mayaqua/ -O2 -fsigned-char -m64
++OPTIONS_COMPILE_RELEASE=-DNDEBUG -DVPN_SPEED -DUNIX -DUNIX_LINUX -DCPU_64 -D_REENTRANT -DREENTRANT -D_THREAD_SAFE -D_THREADSAFE -DTHREAD_SAFE -DTHREADSAFE -D_FILE_OFFSET_BITS=64 -I./src/ -I./src/Cedar/ -I./src/Mayaqua/ -O2 -fsigned-char
+-OPTIONS_LINK_RELEASE=-O2 -fsigned-char -m64 -lm -ldl -lrt -lpthread -lssl -lcrypto -lreadline -lncurses -lz
++OPTIONS_LINK_RELEASE=-O2 -fsigned-char -lm -ldl -lrt -lpthread -lssl -lcrypto -lreadline -lncurses -lz
+ INSTALL_BINDIR=/usr/bin/
+ INSTALL_VPNSERVER_DIR=/usr/vpnserver/