chore: ArchNetworkBSD:Deps use make_shared now that we dont build on ubuntu 22 anymore
This commit is contained in:
parent
f4a49749c7
commit
0321b2d36e
1 changed files with 1 additions and 4 deletions
|
|
@ -73,10 +73,7 @@ int ArchNetworkBSD::Deps::poll(struct pollfd *fds, nfds_t nfds, int timeout)
|
||||||
|
|
||||||
std::shared_ptr<struct pollfd[]> ArchNetworkBSD::Deps::makePollFD(nfds_t n)
|
std::shared_ptr<struct pollfd[]> ArchNetworkBSD::Deps::makePollFD(nfds_t n)
|
||||||
{
|
{
|
||||||
// C++20 supports std::make_shared<struct pollfd[]>(n) but this is not
|
return std::make_shared<struct pollfd[]>(n);
|
||||||
// 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<struct pollfd[]>(new struct pollfd[n], std::default_delete<struct pollfd[]>());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ssize_t ArchNetworkBSD::Deps::read(int fd, void *buf, size_t len)
|
ssize_t ArchNetworkBSD::Deps::read(int fd, void *buf, size_t len)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue