Skip to content

Commit

Permalink
Correct nfds_t size on Android
Browse files Browse the repository at this point in the history
Turns out bionic uses an unsigned int (unlike other Linux libcs).
  • Loading branch information
bptato committed Jan 24, 2025
1 parent 1f9cac1 commit bc30c81
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/posix/posix.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,9 @@ when not defined(lwip):
# Meanwhile, BSD derivatives had used unsigned int; we will use this
# for the else case, because it is more widely cloned than SVR4's
# behavior.
when defined(linux) or defined(haiku):
# Finally, bionic libc (Android) also uses unsigned int, despite being
# a Linux.
when defined(linux) and not defined(android) or defined(haiku):
type
Tnfds* {.importc: "nfds_t", header: "<poll.h>".} = culong
elif defined(zephyr):
Expand Down

0 comments on commit bc30c81

Please sign in to comment.