From 6ff747f023cb4e6289a48dca608ef150e7410b00 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Wed, 16 Dec 2020 05:10:16 -0800 Subject: [PATCH] c++: Fix (some) solaris breakage Solaris' sys/socket uses the poisoned bcopy identifier, so we must preemptively copy a bit of cody's inclusion logic to get it earlier. gcc/cp/ * mapper-client.cc: Include sys/socket.h before system.h. --- gcc/cp/mapper-client.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gcc/cp/mapper-client.cc b/gcc/cp/mapper-client.cc index acec591296a..2ad770b3d78 100644 --- a/gcc/cp/mapper-client.cc +++ b/gcc/cp/mapper-client.cc @@ -19,6 +19,11 @@ along with GCC; see the file COPYING3. If not see . */ #include "config.h" +#if defined (__unix__) +// Solaris11's socket header used bcopy, which we poison. cody.hh +// will include it later under the above check +#include +#endif #include "system.h" #include "line-map.h" @@ -28,6 +33,10 @@ along with GCC; see the file COPYING3. If not see #include "../../c++tools/resolver.h" +#if !HOST_HAS_O_CLOEXEC +#define O_CLOEXEC 0 +#endif + module_client::module_client (pex_obj *p, int fd_from, int fd_to) : Client (fd_from, fd_to), pex (p) { -- 2.30.2