HomeFreeBSD

net/udt: fix build on 14.1-RELEASE

Description

net/udt: fix build on 14.1-RELEASE

core.cpp:2465:19: error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension]
2465 | char cookiestr[(AF_INET == addr->sa_family ? INET_ADDRSTRLEN : INET6_ADDRSTRLEN) +

|                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

2466 | sizeof(clientport) + 64];

|       ~~~~~~~~~~~~~~~~~~~~~~~

core.cpp:2465:31: note: function parameter 'addr' with unknown value cannot be used in a constant expression
2465 | char cookiestr[(AF_INET == addr->sa_family ? INET_ADDRSTRLEN : INET6_ADDRSTRLEN) +

|                               ^

core.cpp:2452:28: note: declared here
2452 | int CUDT::listen(sockaddr* addr, CPacket& packet)

|                            ^

1 error generated.

Details

Provenance
pkubajAuthored on Jul 29 2024, 11:40 AM
Parents
R11:12a9620a124f: misc/opennn: fix build on powerpc
Branches
Unknown
Tags
Unknown