diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c index b5696ac4..ae31ce60 100644 --- a/sysdep/unix/io.c +++ b/sysdep/unix/io.c @@ -1557,8 +1557,8 @@ static inline int sk_sendmsg(sock *s) { struct iovec iov = {s->tbuf, s->tpos - s->tbuf}; - byte cmsg_buf[CMSG_TX_SPACE]; - sockaddr dst; + static _Thread_local byte cmsg_buf[CMSG_TX_SPACE] = {}; + static _Thread_local sockaddr dst = {}; int flags = 0; sockaddr_fill(&dst, s->af, s->daddr, s->iface, s->dport);