lxip: provide struct file pointer for udp_poll

Lxip may deference the file pointer in 'udp_poll()'. So we provide a
valid dummy object.

Fixes #1371.
This commit is contained in:
Josef Söntgen 2014-06-17 15:57:54 +02:00 committed by Christian Helmuth
parent 363fd6065d
commit a36d0ec83a
1 changed files with 7 additions and 1 deletions

View File

@ -273,11 +273,17 @@ class Net::Socketcall : public Genode::Signal_dispatcher_base,
POLLEX_SET = (POLLPRI)
};
/*
* Needed by udp_poll because it may check file->f_flags
*/
struct file f;
f.f_flags = 0;
/*
* Set socket wait queue to one so we can block poll in 'tcp_poll -> poll_wait'
*/
set_sock_wait(sock, _call.poll.block ? 1 : 0);
int mask =sock->ops->poll(0, sock, 0);
int mask = sock->ops->poll(&f, sock, 0);
set_sock_wait(sock, 0);
_result.err = 0;