diff --git a/src/lib/arch/unix/ArchNetworkBSD.cpp b/src/lib/arch/unix/ArchNetworkBSD.cpp index 47047e553..6ca9fe49f 100644 --- a/src/lib/arch/unix/ArchNetworkBSD.cpp +++ b/src/lib/arch/unix/ArchNetworkBSD.cpp @@ -73,10 +73,7 @@ int ArchNetworkBSD::Deps::poll(struct pollfd *fds, nfds_t nfds, int timeout) std::shared_ptr ArchNetworkBSD::Deps::makePollFD(nfds_t n) { - // C++20 supports std::make_shared(n) but this is not - // implemented on the compiler that comes with Ubuntu 22 and a few other - // distros, so use the manual new and delete until we drop those distros. - return std::shared_ptr(new struct pollfd[n], std::default_delete()); + return std::make_shared(n); } ssize_t ArchNetworkBSD::Deps::read(int fd, void *buf, size_t len)