int qemu_poll_ns(GPollFD *fds, guint nfds, int64_t timeout)

{

#ifdef CONFIG_PPOLL

    if (timeout < 0) {

        return ppoll((struct pollfd *)fds, nfds, NULL, NULL);

    } else {

        struct timespec ts;

        ts.tv_sec = timeout / 1000000000LL;

        ts.tv_nsec = timeout % 1000000000LL;

        return ppoll((struct pollfd *)fds, nfds, &ts, NULL);

    }

#else

    return g_poll(fds, nfds, qemu_timeout_ns_to_ms(timeout));

#endif

}

int qemu_poll_ns(GPollFD *fds, guint nfds, int64_t timeout)

{

#ifdef CONFIG_PPOLL

    if (timeout < 0) {

        return ppoll((struct pollfd *)fds, nfds, NULL, NULL);

    } else {

        struct timespec ts;

        ts.tv_sec = timeout / 1000000000LL;

        ts.tv_nsec = timeout % 1000000000LL;

        return ppoll((struct pollfd *)fds, nfds, &ts, NULL);

    }

#else

    return g_poll(fds, nfds, qemu_timeout_ns_to_ms(timeout));

#endif

}

        ts.tv_sec = timeout / 1000000000LL;
int FUNC_0(GPollFD *VAR_0, guint VAR_1, int64_t VAR_2)

{

#ifdef CONFIG_PPOLL

    if (VAR_2 < 0) {

        return ppoll((struct pollfd *)VAR_0, VAR_1, NULL, NULL);

    } else {

        struct timespec ts;

        ts.tv_sec = VAR_2 / 1000000000LL;

        ts.tv_nsec = VAR_2 % 1000000000LL;

        return ppoll((struct pollfd *)VAR_0, VAR_1, &ts, NULL);

    }

#else

    return g_poll(VAR_0, VAR_1, qemu_timeout_ns_to_ms(VAR_2));

#endif

}

int FUNC_0(GPollFD *VAR_0, guint VAR_1, int64_t VAR_2)
{ #ifdef CONFIG_PPOLL
if (VAR_2 < 0) { return ppoll((struct pollfd *)VAR_0, VAR_1, NULL, NULL); } else { struct timespec ts; ts.tv_sec = VAR_2 / 1000000000LL; ts.tv_nsec = VAR_2 % 1000000000LL; return ppoll((struct pollfd *)VAR_0, VAR_1, &ts, NULL); } #else
return g_poll(VAR_0, VAR_1, qemu_timeout_ns_to_ms(VAR_2)); #endif
}