Other issues (and my fixes) I had:
wolfssl.lib
Not found: windows_time() #include <time> time_t windows_time(time_t* x);
Not found: rewind() #define rewind(x) fseek(x,0,0)
Not found: getenv() #undef OPENSSL_EXTRA
client.exe (and the other extras)
Missing windows APIs: SetCurrentDirectory(), FindFirstFileA(), FindNextFileA() - mine is a UNICODE build
WINBASEAPI
BOOL
WINAPI
SetCurrentDirectoryA(__in LPCSTR lpPathName) {return 0;} //a hack
WINBASEAPI
HANDLE
WINAPI
FindFirstFileA(LPCSTR lpFileName, LPWIN32_FIND_DATAA lpFindFileData) {
struct _WIN32_FIND_DATAW findFileDataW;
wchar_t fileNameW[MAX_PATH];
swprintf(fileNameW, L"%s",lpFileName); // or MultiByteToWideChar
findFileDataW.dwFileAttributes = lpFindFileData->dwFileAttributes;
findFileDataW.ftCreationTime = lpFindFileData->ftCreationTime;
findFileDataW.ftLastAccessTime = lpFindFileData->ftLastAccessTime;
findFileDataW.ftLastWriteTime = lpFindFileData->ftLastWriteTime;
findFileDataW.nFileSizeHigh = lpFindFileData->nFileSizeHigh;
findFileDataW.nFileSizeLow = lpFindFileData->nFileSizeLow;
findFileDataW.dwOID = 0; // CE object identifier
// reserved0 - used by file Attributes if reparse is supported
// reserved1 - for future use
swprintf(findFileDataW.cFileName,L"%s", lpFindFileData->cFileName);
// alternatFileName - the old 8.3 filename format
return FindFirstFileW(fileNameW, &findFileDataW);
}
WINBASEAPI
BOOL
WINAPI
FindNextFileA(HANDLE hFindFile, LPWIN32_FIND_DATAA lpFindFileData) {
struct _WIN32_FIND_DATAW findFileDataW;
findFileDataW.dwFileAttributes = lpFindFileData->dwFileAttributes;
findFileDataW.ftCreationTime = lpFindFileData->ftCreationTime;
findFileDataW.ftLastAccessTime = lpFindFileData->ftLastAccessTime;
findFileDataW.ftLastWriteTime = lpFindFileData->ftLastWriteTime;
findFileDataW.nFileSizeHigh = lpFindFileData->nFileSizeHigh;
findFileDataW.nFileSizeLow = lpFindFileData->nFileSizeLow;
findFileDataW.dwOID = 0; // CE object identifier
// reserved0 - used by file Attributes if reparse is supported
// reserved1 - for future use
swprintf(findFileDataW.cFileName,L"%s", lpFindFileData->cFileName);
// alternatFileName - the old 8.3 filename format
return FindNextFileW(hFindFile, &findFileDataW);
}