static int tcp_wait_fd(int fd, int write)

{

    int ev = write ? POLLOUT : POLLIN;

    struct pollfd p = { .fd = fd, .events = ev, .revents = 0 };

    int ret;



    ret = poll(&p, 1, 100);

    return ret < 0 ? ff_neterrno() : p.revents & ev ? 0 : AVERROR(EAGAIN);

}

static int tcp_wait_fd(int fd, int write)

{

    int ev = write ? POLLOUT : POLLIN;

    struct pollfd p = { .fd = fd, .events = ev, .revents = 0 };

    int ret;



    ret = poll(&p, 1, 100);

    return ret < 0 ? ff_neterrno() : p.revents & ev ? 0 : AVERROR(EAGAIN);

}

static int FUNC_0(int VAR_0, int VAR_1)

{

    int VAR_2 = VAR_1 ? POLLOUT : POLLIN;

    struct pollfd VAR_3 = { .VAR_0 = VAR_0, .events = VAR_2, .revents = 0 };

    int VAR_4;



    VAR_4 = poll(&VAR_3, 1, 100);

    return VAR_4 < 0 ? ff_neterrno() : VAR_3.revents & VAR_2 ? 0 : AVERROR(EAGAIN);

}

static int FUNC_0(int VAR_0, int VAR_1)
{ int VAR_2 = VAR_1 ? POLLOUT : POLLIN; struct pollfd VAR_3 = { .VAR_0 = VAR_0, .events = VAR_2, .revents = 0 }; int VAR_4; VAR_4 = poll(&VAR_3, 1, 100); return VAR_4 < 0 ? ff_neterrno() : VAR_3.revents & VAR_2 ? 0 : AVERROR(EAGAIN); }