Skip to content

Commit 81ce090

Browse files
committed
rt: Include the correct header for alloca on windows
1 parent bc5e10d commit 81ce090

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/rt/rust_uv.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
#ifdef __WIN32__
2+
// For alloca
3+
#include <malloc.h>
4+
#endif
15

26
#include "rust_globals.h"
37
#include "rust_task.h"
@@ -98,11 +102,7 @@ rust_uv_loop_delete(uv_loop_t* loop) {
98102
// from a malloc with no backtrace.
99103
//
100104
// This pads our stack with some extra space before deleting the loop
101-
#ifndef __WIN32__
102105
alloca(512);
103-
#else
104-
_alloca(512);
105-
#endif
106106
uv_loop_delete(loop);
107107
}
108108

0 commit comments

Comments
 (0)