lib: Use iov_advance in writev_handler