Skip to content
Snippets Groups Projects
Commit 42b24bf7 authored by bors's avatar bors
Browse files

Auto merge of #787 - vojtechkral:master, r=alexcrichton

Fix kqueue filter consts type on NetBSD [WAS: Provide EV_SET]

Using BSD kqueue's `kevent` structure is tedious, because some BSD variants define the structure slightly differently. This forces user's code to differentiate between BSD variants and initialize `kevent` accordingly, which is annoying and error-prone.

For an example, refer to [MIO](https://github.com/carllerche/mio/blob/master/src/sys/unix/kqueue.rs#L38).

This is an attempt to fix it - provide a ctor function with the same signature across BSD variants.

Is an `impl` piece for a C structure allowed in libc?

**edit:** I noticed the `kevent` function has a similar problem, maybe I should include a fix for that too...
**edit:** ^ Done
parents 0a528191 a0e683ef
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment