changeset 5264:6ae1a7973a7e

* src/pstoedit-1-fixes.patch: fix patch for win32 build
author John Donoghue
date Thu, 09 Jan 2020 13:55:52 -0500
parents c2e770673aa9
children a7bbb803f069
files src/pstoedit-1-fixes.patch
diffstat 1 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/pstoedit-1-fixes.patch	Thu Jan 09 13:35:35 2020 -0500
+++ b/src/pstoedit-1-fixes.patch	Thu Jan 09 13:55:52 2020 -0500
@@ -36,3 +36,18 @@
  libpstoedit_la_LDFLAGS = -no-undefined
  
  pstoedit_SOURCES = cmdmain.cpp
+diff -ur pstoedit-3.75.orig/src/dynload.cpp pstoedit-3.75/src/dynload.cpp
+--- pstoedit-3.75.orig/src/dynload.cpp	2020-01-09 13:50:03.610222335 -0500
++++ pstoedit-3.75/src/dynload.cpp	2020-01-09 13:51:10.084019302 -0500
+@@ -239,8 +239,10 @@
+ 	DynLoader::fptr rfptr = ptr_to_fptr(dlsym(handle, name));	//lint !e611 //: Suspicious cast
+ #elif defined(OS_WIN32_WCE)
+ 	DynLoader::fptr rfptr = ptr_to_fptr(GetProcAddress((HINSTANCE) handle, LPSTRtoLPWSTR(name).c_str()));	//lint !e611 //: Suspicious cast
+-#elif defined(_WIN32)
++#elif defined(_WIN64)
+ 	DynLoader::fptr rfptr = /* ptr_to_fptr */(GetProcAddress((HINSTANCE) handle, name));	//lint !e611 //: Suspicious cast
++#elif defined(_WIN32)
++	DynLoader::fptr rfptr = ptr_to_fptr((void*)GetProcAddress((HINSTANCE) handle, name));	//lint !e611 //: Suspicious cast
+ #else
+ #error "system unsupported so far"
+ #endif