diff --git a/examples/client.cc b/examples/client.cc index 4b6623d5a5e319282740c4b0b231891e39a4170a..53e31cfd4c44f917c2047dd728e93bc56fb0bd4b 100644 --- a/examples/client.cc +++ b/examples/client.cc @@ -1062,12 +1062,12 @@ int Client::on_read() { msg.msg_iov = &msg_iov; msg.msg_iovlen = 1; - std::array<uint8_t, CMSG_SPACE(sizeof(uint8_t))> msg_ctrl; - msg.msg_control = msg_ctrl.data(); + uint8_t msg_ctrl[CMSG_SPACE(sizeof(uint8_t))]; + msg.msg_control = msg_ctrl; for (;;) { msg.msg_namelen = sizeof(su); - msg.msg_controllen = msg_ctrl.size(); + msg.msg_controllen = sizeof(msg_ctrl); auto nread = recvmsg(fd_, &msg, MSG_DONTWAIT); diff --git a/examples/h09client.cc b/examples/h09client.cc index d1b6adbc229f7fe6efc38b9508621d9b44554f1a..e6fb370b0c5100d0570fc3709a24cb2d3840bb57 100644 --- a/examples/h09client.cc +++ b/examples/h09client.cc @@ -1041,12 +1041,12 @@ int Client::on_read() { msg.msg_iov = &msg_iov; msg.msg_iovlen = 1; - std::array<uint8_t, CMSG_SPACE(sizeof(uint8_t))> msg_ctrl; - msg.msg_control = msg_ctrl.data(); + uint8_t msg_ctrl[CMSG_SPACE(sizeof(uint8_t))]; + msg.msg_control = msg_ctrl; for (;;) { msg.msg_namelen = sizeof(su); - msg.msg_controllen = msg_ctrl.size(); + msg.msg_controllen = sizeof(msg_ctrl); auto nread = recvmsg(fd_, &msg, MSG_DONTWAIT); diff --git a/examples/h09server.cc b/examples/h09server.cc index b695b52a9eb801f043d7f7695f506783607de39c..b1bf5b7de37be96d89d7ccf5ba17173a12cd1a3d 100644 --- a/examples/h09server.cc +++ b/examples/h09server.cc @@ -1735,12 +1735,12 @@ int Server::on_read(Endpoint &ep) { msg.msg_iov = &msg_iov; msg.msg_iovlen = 1; - std::array<uint8_t, CMSG_SPACE(sizeof(uint8_t))> msg_ctrl; - msg.msg_control = msg_ctrl.data(); + uint8_t msg_ctrl[CMSG_SPACE(sizeof(uint8_t))]; + msg.msg_control = msg_ctrl; for (; pktcnt < 10;) { msg.msg_namelen = sizeof(su); - msg.msg_controllen = msg_ctrl.size(); + msg.msg_controllen = sizeof(msg_ctrl); auto nread = recvmsg(ep.fd, &msg, MSG_DONTWAIT); if (nread == -1) { diff --git a/examples/server.cc b/examples/server.cc index a74c26f8d856d311927ddf033cce30ef9cd67324..b038045f26508a03cc34c5b0e5240cc7025099f3 100644 --- a/examples/server.cc +++ b/examples/server.cc @@ -2367,12 +2367,12 @@ int Server::on_read(Endpoint &ep) { msg.msg_iov = &msg_iov; msg.msg_iovlen = 1; - std::array<uint8_t, CMSG_SPACE(sizeof(uint8_t))> msg_ctrl; - msg.msg_control = msg_ctrl.data(); + uint8_t msg_ctrl[CMSG_SPACE(sizeof(uint8_t))]; + msg.msg_control = msg_ctrl; for (; pktcnt < 10;) { msg.msg_namelen = sizeof(su); - msg.msg_controllen = msg_ctrl.size(); + msg.msg_controllen = sizeof(msg_ctrl); auto nread = recvmsg(ep.fd, &msg, MSG_DONTWAIT); if (nread == -1) {