fixed memalign build

This commit is contained in:
Arvid Norberg 2010-03-05 23:07:29 +00:00
parent 34c5420ece
commit a7e6ce7c00
1 changed files with 2 additions and 2 deletions

View File

@ -74,9 +74,9 @@ namespace libtorrent
#if TORRENT_USE_POSIX_MEMALIGN
void* ret;
if (posix_memalign(&ret, page_size(), bytes) != 0) ret = 0;
return ret;
return (char*)ret;
#elif TORRENT_USE_MEMALIGN
return memalign(page_size(), bytes);
return (char*)memalign(page_size(), bytes);
#elif defined TORRENT_WINDOWS
return (char*)VirtualAlloc(0, bytes, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
#elif defined TORRENT_BEOS