diff --git a/Source/mmap.cpp b/Source/mmap.cpp index e6f21f39..fd7e38a5 100644 --- a/Source/mmap.cpp +++ b/Source/mmap.cpp @@ -312,7 +312,7 @@ void MMapFile::release() #ifdef _WIN32 UnmapViewOfFile(m_pView); #else - munmap(m_pView, m_iMappedSize); + munmap((char *)m_pView, m_iMappedSize); #endif m_pView = NULL; } @@ -328,7 +328,7 @@ void MMapFile::release(void *pView, int size) #ifdef _WIN32 UnmapViewOfFile(pView); #else - munmap(pView, size); + munmap((char *)pView, size); #endif } @@ -338,7 +338,7 @@ void MMapFile::flush(int num) #ifdef _WIN32 FlushViewOfFile(m_pView, num); #else - msync(m_pView, num, MS_SYNC); + msync((char *)m_pView, num, MS_SYNC); #endif } diff --git a/Source/mmap.h b/Source/mmap.h index 9f144498..8d2aafc5 100644 --- a/Source/mmap.h +++ b/Source/mmap.h @@ -22,6 +22,7 @@ #ifndef _WIN32 #include // for FILE* +#include // (some systems have FILE* in here) #endif class IMMap diff --git a/Source/strlist.h b/Source/strlist.h index d65d916d..5834a957 100644 --- a/Source/strlist.h +++ b/Source/strlist.h @@ -19,6 +19,7 @@ #include "Platform.h" #include +#include #include "growbuf.h" class StringList diff --git a/Source/util.cpp b/Source/util.cpp index f7dba502..a56078e7 100644 --- a/Source/util.cpp +++ b/Source/util.cpp @@ -29,6 +29,7 @@ # include // for close(2) # include // for open(2) # include +# include #endif #ifdef __APPLE__ @@ -179,7 +180,7 @@ int wsprintf(char *s, const char *format, ...) { // iconv const inconsistency workaround by Alexandre Oliva template -inline size_t __iconv_adaptor +inline size_t nsis_iconv_adaptor (size_t (*iconv_func)(iconv_t, T, size_t *, char**,size_t*), iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft) @@ -221,7 +222,7 @@ int WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr, size_t inbytes = cchWideChar * sizeof(WCHAR); size_t outbytes = cbMultiByte; - if (__iconv_adaptor(iconv, cd, &in, &inbytes, &out, &outbytes) == (size_t) -1) { + if (nsis_iconv_adaptor(iconv, cd, &in, &inbytes, &out, &outbytes) == (size_t) -1) { iconv_close(cd); return 0; } @@ -257,7 +258,7 @@ int MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr, size_t inbytes = cbMultiByte; size_t outbytes = cchWideChar * sizeof(WCHAR); - if (__iconv_adaptor(iconv, cd, &in, &inbytes, &out, &outbytes) == (size_t) -1) { + if (nsis_iconv_adaptor(iconv, cd, &in, &inbytes, &out, &outbytes) == (size_t) -1) { iconv_close(cd); return 0; }