Skip to content

Fix NetBSD build error due to UData type mismatched#1923

Merged
Darksonn merged 1 commit intotokio-rs:masterfrom
AaronChen0:master
Dec 3, 2025
Merged

Fix NetBSD build error due to UData type mismatched#1923
Darksonn merged 1 commit intotokio-rs:masterfrom
AaronChen0:master

Conversation

@AaronChen0
Copy link
Contributor

libc 0.2.178 changed the type of kevent.udata to brings it in line with other BSDs.

Without this pull request, netbsd build failed with the following error.

error[E0308]: mismatched types
   --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.0/src/sys/unix/selector/kqueue.rs:64:20
    |
 64 |             udata: $data as UData,
    |                    ^^^^^^^^^^^^^^ expected `*mut c_void`, found `isize`
...
137 |             let kevent = kevent!(fd, libc::EVFILT_WRITE, flags, token.0);
    |                          ----------------------------------------------- in this macro invocation
    |
    = note: expected raw pointer `*mut c_void`
                      found type `isize`
    = note: this error originates in the macro `kevent` (in Nightly builds, run with -Z macro-backtrace for more info)

Reference:
rust-lang/libc@63f4037
https://github.com/shadowsocks/shadowsocks-rust/actions/runs/19874531148/job/56958491608

Copy link
Member

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@Darksonn Darksonn merged commit 625655d into tokio-rs:master Dec 3, 2025
59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants