Commit df6fbc2c authored by Kenton Varda's avatar Kenton Varda

Work around GCC 4.9 not liking empty struct initializers.

parent 50fe1805
...@@ -475,7 +475,8 @@ TEST(AsyncUnixTest, UrgentObserver) { ...@@ -475,7 +475,8 @@ TEST(AsyncUnixTest, UrgentObserver) {
// Spawn a TCP server // Spawn a TCP server
KJ_SYSCALL(tmpFd = socket(AF_INET, SOCK_STREAM, 0)); KJ_SYSCALL(tmpFd = socket(AF_INET, SOCK_STREAM, 0));
kj::AutoCloseFd serverFd(tmpFd); kj::AutoCloseFd serverFd(tmpFd);
sockaddr_in saddr = {}; sockaddr_in saddr;
memset(&saddr, 0, sizeof(saddr));
saddr.sin_family = AF_INET; saddr.sin_family = AF_INET;
saddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); saddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
KJ_SYSCALL(bind(serverFd, reinterpret_cast<sockaddr*>(&saddr), sizeof(saddr))); KJ_SYSCALL(bind(serverFd, reinterpret_cast<sockaddr*>(&saddr), sizeof(saddr)));
......
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