mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-29 06:46:35 -04:00
Disable O_NONBLOCK assert on FreeBSD
This commit is contained in:
parent
770bd79a9c
commit
7d314ce738
1 changed files with 2 additions and 0 deletions
2
fdm.c
2
fdm.c
|
|
@ -97,12 +97,14 @@ bool
|
||||||
fdm_add(struct fdm *fdm, int fd, int events, fdm_handler_t handler, void *data)
|
fdm_add(struct fdm *fdm, int fd, int events, fdm_handler_t handler, void *data)
|
||||||
{
|
{
|
||||||
#if defined(_DEBUG)
|
#if defined(_DEBUG)
|
||||||
|
#ifdef __FreeBSD__
|
||||||
int flags = fcntl(fd, F_GETFL);
|
int flags = fcntl(fd, F_GETFL);
|
||||||
if (!(flags & O_NONBLOCK)) {
|
if (!(flags & O_NONBLOCK)) {
|
||||||
LOG_ERR("FD=%d is in blocking mode", fd);
|
LOG_ERR("FD=%d is in blocking mode", fd);
|
||||||
assert(false);
|
assert(false);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
tll_foreach(fdm->fds, it) {
|
tll_foreach(fdm->fds, it) {
|
||||||
if (it->item->fd == fd) {
|
if (it->item->fd == fd) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue