Commit 8e121e4
authored
[android] fix 32 bit android build (#656)
This fixes the following errors:
```
S:/SourceCache/swift-testing/Sources/Testing/Support/FileHandle.swift:423:70: error: cannot convert value of type 'UInt32' to expected argument type 'mode_t' (aka 'UInt16')
421 | }
422 | var statStruct = stat()
423 | return (0 == fstat(fd, &statStruct) && swt_S_ISFIFO(statStruct.st_mode))
| `- error: cannot convert value of type 'UInt32' to expected argument type 'mode_t' (aka 'UInt16')
424 | }
425 | #elseif os(Windows)
S:/SourceCache/swift-testing/Sources/Testing/Support/GetSymbol.swift:34:73: error: integer literal '4294967295' overflows when stored into 'Int'
32 | private nonisolated(unsafe) let RTLD_DEFAULT = ImageAddress(bitPattern: -2)
33 | #elseif os(Android) && _pointerBitWidth(_32)
34 | private nonisolated(unsafe) let RTLD_DEFAULT = ImageAddress(bitPattern: 0xFFFFFFFF)
| `- error: integer literal '4294967295' overflows when stored into 'Int'
```
### Motivation:
Fix 32 bit android build.
### Modifications:
Add explicit types to to cast correctly and to pick correct overload.
### Result:
Android swift-testing will build for armv7k and i686.
### Checklist:
- [x] Code and documentation should follow the style of the [Style
Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md).
- [x] If public symbols are renamed or modified, DocC references should
be updated.1 parent f2c8ee1 commit 8e121e4
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
423 | | - | |
| 423 | + | |
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
0 commit comments