diff --git a/src/event/PollGroupWinSelect.hxx b/src/event/PollGroupWinSelect.hxx index a296f8ce7..d44aa3c6f 100644 --- a/src/event/PollGroupWinSelect.hxx +++ b/src/event/PollGroupWinSelect.hxx @@ -22,11 +22,10 @@ #include "PollResultGeneric.hxx" +#include #include #include -#include - #include #include @@ -46,9 +45,7 @@ public: SocketSet(const SocketSet &other) noexcept { set.fd_count = other.set.fd_count; - memcpy(set.fd_array, - other.set.fd_array, - sizeof (SOCKET) * set.fd_count); + std::copy_n(other.set.fd_array, set.fd_count, set.fd_array); } fd_set *GetPtr() noexcept {