another FreeBSD fix

This commit is contained in:
Arvid Norberg 2012-04-15 01:02:55 +00:00
parent ba4c77e7e5
commit 7cf7243021
1 changed files with 6 additions and 2 deletions

View File

@ -34,15 +34,19 @@ POSSIBILITY OF SUCH DAMAGE.
#include "libtorrent/config.hpp" #include "libtorrent/config.hpp"
#ifdef TORRENT_WINDOWS #if defined TORRENT_WINDOWS
#include <malloc.h> #include <malloc.h>
#define TORRENT_ALLOCA(t, n) static_cast<t*>(_alloca(sizeof(t) * (n))) #define TORRENT_ALLOCA(t, n) static_cast<t*>(_alloca(sizeof(t) * (n)))
#elif defined TORRENT_BSD
#include <stdlib.h>
#define TORRENT_ALLOCA(t, n) static_cast<t*>(alloca(sizeof(t) * (n)))
#else #else
#include <alloca.h> #include <alloca.h>
#define TORRENT_ALLOCA(t, n) static_cast<t*>(alloca(sizeof(t) * (n))) #define TORRENT_ALLOCA(t, n) static_cast<t*>(alloca(sizeof(t) * (n)))
#endif #endif