Skip to content

Commit 3d4953c

Browse files
authored
Avoid including headers that are not needed in Random.cpp for __APPLE__ (#41340)
1 parent c67b72b commit 3d4953c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

stdlib/public/stubs/Random.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
#include <Bcrypt.h>
2424
#pragma comment(lib, "bcrypt.lib")
2525
#elif !defined(__APPLE__)
26+
2627
#include <errno.h>
2728
#include <fcntl.h>
28-
#endif
2929

3030
#if __has_include(<sys/random.h>)
3131
#include <sys/random.h>
@@ -37,6 +37,8 @@
3737
#include <sys/syscall.h>
3838
#endif
3939

40+
#endif
41+
4042
#include <stdlib.h>
4143

4244
#include "swift/Runtime/Debug.h"

0 commit comments

Comments
 (0)