Skip to content

Commit 430e6b6

Browse files
committed
[android] fix the build
the posix_filesystem module is available only from Swift, as it comes from the Swift android overlay
1 parent 70f173e commit 430e6b6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/_TestingInternals/include/Includes.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,12 @@
140140
#endif
141141

142142
#if defined(__ANDROID__)
143+
#ifdef __swift__
144+
// The linux/stat header is private in the Android modulemap.
143145
#pragma clang module import posix_filesystem.linux_stat
146+
#else
147+
#include <linux/stat.h>
148+
#endif
144149
#include <sys/system_properties.h>
145150
#endif
146151

0 commit comments

Comments
 (0)