Commit 78ce68f1 authored by Dominik Charousset's avatar Dominik Charousset

Fix linker issue with socket_guard

parent e35e7016
......@@ -19,7 +19,7 @@
#include "caf/detail/get_mac_addresses.hpp"
#include "caf/config.hpp"
#include "caf/detail/socket_guard.hpp"
#include "caf/detail/scope_guard.hpp"
#if defined(CAF_MACOS) || defined(CAF_BSD) || defined(CAF_IOS)
......@@ -130,7 +130,9 @@ std::vector<iface_info> get_mac_addresses() {
perror("socket");
return {};
}
socket_guard guard{sck};
auto g = make_scope_guard([&] {
close(sck);
});
// query available interfaces
char buf[1024] = {0};
ifconf ifc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment