Replica of svn.code.sf.net/p/libkqueue