mat813 / rb-kqueue

An FFI wrapper for kqueue
MIT License
22 stars 12 forks source link

Support NetBSD #8

Closed ghost closed 7 years ago

ghost commented 10 years ago

NetBSD uses different sizes of the members filter, flags of the structure kevent. It also uses different numbering of the EVFILT_ flags.

I've compared the event.h header files of FreeBSD, NetBSD and OpenBSD and changed the files lib/rb-kqueue/native.rb and lib/rb-kqueue/native/flags.rb to match what I've found there regarding the kevent structure and the EVFILT_ flags.

c.f.

http://svnweb.freebsd.org/base/head/sys/sys/event.h?revision=HEAD&view=co
http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/sys/event.h?rev=HEAD&content-type=text/plain
http://www.openbsd.org/cgi-bin/cvsweb/src/sys/sys/event.h?rev=HEAD;content-type=text%2Fplain
ghost commented 10 years ago

Note: the FFI::Platform::IS_NETBSD code is not yet in ffi, I've requested a pullup: https://github.com/ffi/ffi/pull/350

mat813 commented 10 years ago

Let me know when ffi gets a release out with FFI::Platform::IS_NETBSD, I'll merge the pull request and get a new release out at that time 😄

ghost commented 9 years ago

ffi-1.9.5 is out.