about summary refs log tree commit diff stats
path: root/src/io
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-09-26 17:54:20 +0200
committerbptato <nincsnevem662@gmail.com>2024-09-26 17:54:20 +0200
commite289dd0d37750e1f3f5d6386b87c4e2451167277 (patch)
tree3f3a0f3b00a3d0e7d56c02dbd78489c05de4892b /src/io
parent9d5a9b167c5ef302c36e4e08090ce862f22a59fb (diff)
downloadchawan-e289dd0d37750e1f3f5d6386b87c4e2451167277.tar.gz
Fixes for FreeBSD
Diffstat (limited to 'src/io')
-rw-r--r--src/io/poll.nim6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/io/poll.nim b/src/io/poll.nim
index 3c2c29a8..f394233e 100644
--- a/src/io/poll.nim
+++ b/src/io/poll.nim
@@ -37,4 +37,8 @@ proc clear*(ctx: var PollData) =
 
 proc poll*(ctx: var PollData; timeout: cint) =
   ctx.trim()
-  discard poll(addr ctx.fds[0], Tnfds(ctx.fds.len), cint(timeout))
+  let fds = addr ctx.fds[0]
+  let nfds = cint(ctx.fds.len)
+  {.emit: """
+  poll(`fds`, `nfds`, `timeout`);
+  """.}