I am Trying to use kqueue for doing an event oriented server in c when i compile my code it give me this error

fatal error: sys/event.h: No such file or directory

according to a tutorial that I am following to create the kqueue events that file have to be include I am new to events programming in C

有帮助吗?

解决方案

kqueue is only present in BSD (FreeBSD / OpenBSD) and Darwin (Mac OS X / iOS) kernels. It does not exist in the Linux kernel.

The closest equivalents available on Linux are epoll for asynchronous I/O, and inotify for file system watches.

其他提示

kqueue is a BSD feature. you cannot use it on Linux. the equivalent feature on Linux is epoll.

If you want t try kqueue in any platform other than BSD, then https://github.com/mheily/libkqueue library is your way to go!! give this a try.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top