Skip to content

Commit 444e2f4

Browse files
committed
Android: do not re-export macros from linux/stat.h from other modules
This lets us declare constants in the Android platform module using the expected mode_t type
1 parent dac0739 commit 444e2f4

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

stdlib/public/Platform/android.modulemap

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ module posix_filesystem [system] {
178178
}
179179
explicit module fcntl {
180180
header "fcntl.h"
181-
export *
181+
// Note: Do not re-export imported modules
182+
// to prevent exporting constants from linux/stat.h .
182183
}
183184
explicit module fnmatch {
184185
header "fnmatch.h"
@@ -228,6 +229,10 @@ module posix_filesystem [system] {
228229
header "bits/ioctl.h"
229230
export *
230231
}
232+
explicit module linux_stat {
233+
private header "linux/stat.h"
234+
export *
235+
}
231236
explicit module sys_epoll {
232237
header "sys/epoll.h"
233238
export *
@@ -262,7 +267,8 @@ module posix_filesystem [system] {
262267
}
263268
explicit module sys_stat {
264269
header "sys/stat.h"
265-
export *
270+
// Note: Do not re-export imported modules
271+
// to prevent exporting constants from linux/stat.h .
266272
}
267273
explicit module sys_statvfs {
268274
header "sys/statvfs.h"

0 commit comments

Comments
 (0)