Skip to content

Commit

Permalink
Fix Native compile
Browse files Browse the repository at this point in the history
  • Loading branch information
armanbilge committed Sep 30, 2024
1 parent d73ed80 commit 2c7ef31
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/native/src/main/scala/cats/effect/Signal.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import java.io.IOException
private object Signal {

private[this] def mkPipe() = if (isLinux || isMac) {
val fd = stackalloc[CInt](2)
val fd = stackalloc[CInt](2.toULong)
if (pipe(fd) != 0)
throw new IOException(fromCString(strerror(errno)))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ object EpollSystem extends PollingSystem {

private[EpollSystem] def poll(timeout: Long): Boolean = {

val events = stackalloc[epoll_event](MaxEvents.toLong)
val events = stackalloc[epoll_event](MaxEvents.toULong)
var polled = false

@tailrec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ object KqueueSystem extends PollingSystem {

private[KqueueSystem] def poll(timeout: Long): Boolean = {

val eventlist = stackalloc[kevent64_s](MaxEvents.toLong)
val eventlist = stackalloc[kevent64_s](MaxEvents.toULong)
var polled = false

@tailrec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class FileDescriptorPollerSpec extends BaseSpec {
Resource
.make {
IO {
val fd = stackalloc[CInt](2)
val fd = stackalloc[CInt](2.toULong)
if (unistd.pipe(fd) != 0)
throw new IOException(fromCString(strerror(errno)))
(fd(0), fd(1))
Expand Down

0 comments on commit 2c7ef31

Please sign in to comment.