fix poll() usage in #546