Skip to content

Commit e39babe

Browse files
authored
Fix building LibcShims.cpp with MSVC v14.37
`_swift_stdlib_configure_console_mode` reverts console codepage on Windows using `atexit`, which is declared in `stdlib.h`. Add the missing `#include <stdlib.h>` to unblock building Swift `stdlib` with MSVC v14.37 (Visual Studio 17.7).
1 parent e1e81d5 commit e39babe

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

stdlib/public/stubs/LibcShims.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
#if defined(_WIN32) && !defined(__CYGWIN__)
1919
#include <io.h>
20+
#include <stdlib.h>
2021
#define WIN32_LEAN_AND_MEAN
2122
#include <Windows.h>
2223
#endif

0 commit comments

Comments
 (0)