https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100285
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:f9325e99bbc83f975ce423efaaaded73400b08e3 commit r11-8916-gf9325e99bbc83f975ce423efaaaded73400b08e3 Author: Jonathan Wakely <jwak...@redhat.com> Date: Fri Apr 30 14:25:25 2021 +0100 libstdc++: Use <sys/socket.h> features conditionally [PR 100285] This makes the uses of getsockopt and setsockopt in <experimental/socket> conditional on the availability of <sys/socket.h>. It also fixes a test to check for <sys/socket.h> instead of <socket.h>. libstdc++-v3/ChangeLog: PR libstdc++/100285 * include/experimental/socket (__basic_socket_impl::set_option) (__basic_socket_impl::get_option) [!_GLIBCXX_HAVE_SYS_SOCKET_H]: Just set error code. * testsuite/experimental/net/socket/socket_base.cc: CHeck for <sys/socket.h> not <socket.h>. (cherry picked from commit 0d501c338548152f9d2728d383eec3e9cef16784)