Skip to content

Commit 8e828d5

Browse files
committed
Fixed Android support for CInterop.IOControlID
1 parent 8c5fb2c commit 8e828d5

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

Sources/Socket/System/CInterop.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,5 @@ public extension CInterop {
9090
/// The C `ifaddrs` type
9191
typealias InterfaceLinkedList = ifaddrs
9292

93-
#if os(Android)
94-
typealias IOControlID = Int32
95-
#else
9693
typealias IOControlID = CUnsignedLong
97-
#endif
9894
}

Sources/Socket/System/Syscalls.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -536,13 +536,13 @@ func _ioctl(_ fd: CInt, _ request: CInterop.IOControlID) -> CInt {
536536
}
537537

538538
@_silgen_name("android_fcntl")
539-
func android_fcntl(_ fd: Int32, _ cmd: CInterop.IOControlID) -> Int32
539+
func android_fcntl(_ fd: Int32, _ cmd: Int32) -> Int32
540540

541541
@_silgen_name("android_fcntl_value")
542-
func android_fcntl_value(_ fd: Int32, _ cmd: CInterop.IOControlID, _ value: Int32) -> Int32
542+
func android_fcntl_value(_ fd: Int32, _ cmd: Int32, _ value: Int32) -> Int32
543543

544544
@_silgen_name("android_fcntl_ptr")
545-
func android_fcntl_ptr(_ fd: Int32, _ cmd: CInterop.IOControlID, _ ptr: UnsafeMutableRawPointer) -> Int32
545+
func android_fcntl_ptr(_ fd: Int32, _ cmd: Int32, _ ptr: UnsafeMutableRawPointer) -> Int32
546546

547547
@_silgen_name("android_ioctl_value")
548548
func android_ioctl_value(_ fd: CInt, _ request: CInterop.IOControlID, _ value: CInt) -> CInt

0 commit comments

Comments
 (0)