Skip to content

Commit

Permalink
iOS fdZero
Browse files Browse the repository at this point in the history
  • Loading branch information
davidepianca98 committed Mar 21, 2023
1 parent 632305e commit 1e0f060
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 24 deletions.
16 changes: 2 additions & 14 deletions kmqtt-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,8 @@ kotlin {
mingwX64 {}
linuxX64 {}
linuxArm64 {}
iosX64 {
compilations.getByName("main") {
val interop by cinterops.creating {
defFile("src/nativeInterop/ios/bindings.def")
}
}
}
iosArm64 {
compilations.getByName("main") {
val interop by cinterops.creating {
defFile("src/nativeInterop/ios/bindings.def")
}
}
}
iosX64 {}
iosArm64 {}
//tvos {}
//watchos {}
//macosX64 {}
Expand Down
2 changes: 1 addition & 1 deletion kmqtt-common/src/iosArm64Main/kotlin/Posix.kt
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ actual fun fdSet(fd: Int, fdSet: CValuesRef<fd_set>) {
}

actual fun fdZero(fdSet: CValuesRef<fd_set>) {
__darwin_fd_zero(fdSet)
memset(fdSet, 0, sizeOf<fd_set>().convert())
}

actual fun fdIsSet(fd: Int, fdSet: CValuesRef<fd_set>): Int {
Expand Down
2 changes: 1 addition & 1 deletion kmqtt-common/src/iosX64Main/kotlin/Posix.kt
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ actual fun fdSet(fd: Int, fdSet: CValuesRef<fd_set>) {
}

actual fun fdZero(fdSet: CValuesRef<fd_set>) {
__darwin_fd_zero(fdSet)
memset(fdSet, 0, sizeOf<fd_set>().convert())
}

actual fun fdIsSet(fd: Int, fdSet: CValuesRef<fd_set>): Int {
Expand Down
8 changes: 0 additions & 8 deletions kmqtt-common/src/nativeInterop/ios/bindings.def

This file was deleted.

0 comments on commit 1e0f060

Please sign in to comment.