[Bug libstdc++/100286] experimental/net/internet/socket/opt.cc fails on arm-eabi (r12-137)
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Aug 24 16:00:48 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100286
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:
https://gcc.gnu.org/g:a42b4a9df36cca7b0963542f3283aff3ca8e05a3
commit r11-8913-ga42b4a9df36cca7b0963542f3283aff3ca8e05a3
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Tue Apr 27 13:06:43 2021 +0100
libstdc++: Better preprocessor conditions in net::ip [PR 100286]
This improves the use of preprocessor conditionas to enable/disable
members of namespace net::ip according to what is supported by the
target. This fixes PR 100286 by ensuring that the to_string member
functions are always defined for the address_v4 and address_v6 classes.
On the other hand, the IP protocol classes and internet socket option
classes aren't useful at all if the corresponding constants (such as
IPPROTO_TCP or IPV6_MULTICAST_HOPS) aren't define. So those types are
not defined at all if they can't be used.
The net/internet/socket/opt.cc test uses __has_include to check whether
or not to expect the types to be available.
libstdc++-v3/ChangeLog:
PR libstdc++/100286
* include/experimental/internet (resolver_errc,
resolver_category())
(make_error_code, make_error_condition): Define unconditionally,
only make enumerators and use of gai_strerror depend on the
availability of <netdb.h>.
(address_v4::to_string): Use correct constant for string length.
(address_v4::to_string, address_v6::to_string): Define
unconditionally, throw if unsupported.
(make_address_v4, make_address_v6): Define unconditionally.
Return an error if unsupported.
(tcp, udp, v6_only, unicast::hops, multicast::*): Define
conditionally,
* testsuite/experimental/net/internet/socket/opt.cc: Check for
<netinet/in.h> and <netinet/tcp.h> before using types from
namespace net::ip.
(cherry picked from commit 9ee35a8685ee174c6914059143aceb7009d3e920)
More information about the Gcc-bugs
mailing list