diff --git a/include/libtorrent/alloca.hpp b/include/libtorrent/alloca.hpp index 0eec9f0ff..11a05ef17 100644 --- a/include/libtorrent/alloca.hpp +++ b/include/libtorrent/alloca.hpp @@ -34,15 +34,19 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/config.hpp" -#ifdef TORRENT_WINDOWS +#if defined TORRENT_WINDOWS #include #define TORRENT_ALLOCA(t, n) static_cast(_alloca(sizeof(t) * (n))) +#elif defined TORRENT_BSD + +#include +#define TORRENT_ALLOCA(t, n) static_cast(alloca(sizeof(t) * (n))) + #else #include - #define TORRENT_ALLOCA(t, n) static_cast(alloca(sizeof(t) * (n))) #endif