diff --git a/Sources/NIOFileSystem/Internal/System Calls/Syscall.swift b/Sources/NIOFileSystem/Internal/System Calls/Syscall.swift index 5fcc8861c9..423dd56bb9 100644 --- a/Sources/NIOFileSystem/Internal/System Calls/Syscall.swift +++ b/Sources/NIOFileSystem/Internal/System Calls/Syscall.swift @@ -308,6 +308,7 @@ public enum Libc { } } + #if !os(Android) static func constr(_ name: CInt) -> Result { var buffer = [CInterop.PlatformChar](repeating: 0, count: 128) @@ -331,6 +332,7 @@ public enum Libc { } } while true } + #endif static func ftsOpen(_ path: FilePath, options: FTSOpenOptions) -> Result { // 'fts_open' needs an unsafe mutable pointer to the C-string, `FilePath` doesn't offer this diff --git a/Sources/NIOFileSystem/Internal/System Calls/Syscalls.swift b/Sources/NIOFileSystem/Internal/System Calls/Syscalls.swift index 7f42c3e796..be043e9dec 100644 --- a/Sources/NIOFileSystem/Internal/System Calls/Syscalls.swift +++ b/Sources/NIOFileSystem/Internal/System Calls/Syscalls.swift @@ -384,6 +384,7 @@ internal func libc_getcwd( } /// confstr(3) +#if !os(Android) internal func libc_confstr( _ name: CInt, _ buffer: UnsafeMutablePointer, @@ -391,6 +392,7 @@ internal func libc_confstr( ) -> Int { return confstr(name, buffer, size) } +#endif /// fts(3) internal func libc_fts_open(