문제

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