add include of process.h for _getpid and add a cast to fix warning

pull/587/head
JacobBarthelmeh 2023-09-20 13:29:33 -06:00
parent 12b7c3af93
commit c349510cc3
2 changed files with 4 additions and 1 deletions

View File

@ -57,6 +57,9 @@
#ifndef WIN32
#include <dirent.h>
#endif
#ifdef WIN32
#include <process.h>
#endif
struct WOLFSSHD_CONFIG {
void* heap;

View File

@ -2590,7 +2590,7 @@ static int SFTP_CreateLongName(WS_SFTPNAME* name)
totalSz += 7; /* for all ' ' spaces */
totalSz += 3 + 8 + 8; /* linkCount + uid + gid */
WSNPRINTF(sizeStr, sizeof(sizeStr) - 1, "%8lld", ((long long int)atr->sz[1] << 32) + (long long int)(atr->sz[0]));
totalSz += WSTRLEN(sizeStr);
totalSz += (int)WSTRLEN(sizeStr);
#else
totalSz = name->fSz;
#endif