nghttpx: Workaround for Ubuntu 15.04 which does not value-initialize on std::make_shared.

This commit is contained in:
Tatsuhiro Tsujikawa 2016-03-23 01:32:17 +09:00
parent e9f4d0eec2
commit 7c954c1ea7
1 changed files with 5 additions and 0 deletions

View File

@ -127,6 +127,11 @@ Worker::Worker(struct ev_loop *loop, SSL_CTX *sv_ssl_ctx, SSL_CTX *cl_ssl_ctx,
dst.pattern = src.pattern; dst.pattern = src.pattern;
auto shared_addr = std::make_shared<SharedDownstreamAddr>(); auto shared_addr = std::make_shared<SharedDownstreamAddr>();
// TODO for some reason, clang-3.6 which comes with Ubuntu 15.10
// does not value initialize SharedDownstreamAddr above.
*shared_addr = SharedDownstreamAddr{};
shared_addr->addrs.resize(src.addrs.size()); shared_addr->addrs.resize(src.addrs.size());
shared_addr->proto = src.proto; shared_addr->proto = src.proto;