Skip to content

Commit

Permalink
Remove now unneeded fts_open bitcast for Android (#3025)
Browse files Browse the repository at this point in the history
I added this changed function call for Android in #2660 earlier this
year, because of [an incorrect Bionic function signature as explained
recently](#3009 (comment)),
but now that it has been worked around through a new API note as
mentioned there, this change is no longer needed.

I simply did not notice this earlier because it still compiles and
merely gives a warning, which removing this call now silences.
  • Loading branch information
finagolfin authored Dec 15, 2024
1 parent 742ae54 commit 47785ad
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions Sources/NIOFileSystem/Internal/System Calls/Syscall.swift
Original file line number Diff line number Diff line change
Expand Up @@ -400,14 +400,7 @@ public enum Libc {
return valueOrErrno {
pathBytes.withUnsafeMutableBufferPointer { pointer in
// The array must be terminated with a nil.
#if os(Android)
libc_fts_open(
[pointer.baseAddress!, unsafeBitCast(0, to: UnsafeMutablePointer<CInterop.PlatformChar>.self)],
options.rawValue
)
#else
libc_fts_open([pointer.baseAddress, nil], options.rawValue)
#endif
}
}
}
Expand Down

0 comments on commit 47785ad

Please sign in to comment.