Check O_NONBLOCK instead of IO_NDELAY. Include selinfo.h instead of relying on vnode.h to do so. Don't include vnode.h
Not yet connected to the build.