jeremycw / httpserver.h

Single header library for writing non-blocking HTTP servers in C
MIT License
1.78k stars 143 forks source link

Don't use NOTE_SECONDS (Fix portability) #48

Closed yashade closed 3 years ago

yashade commented 3 years ago

OpenBSD doesn't have NOTE_SECONDS (expects milliseconds) so it doesn't build: https://man.openbsd.org/kqueue#EVFILT_TIMER

FreeBSD and macOS will use milliseconds if fflags is not set according to kqueue(2) manpages so this change doesn't break anything:

https://www.freebsd.org/cgi/man.cgi?query=kqueue&sektion=2&apropos=0&manpath=FreeBSD+11.1-RELEASE+and+Ports

https://github.com/apple/darwin-xnu/blob/master/bsd/man/man2/kqueue.2#L602-L605

jeremycw commented 3 years ago

Thanks