From 269e82d49e2d5bf26ab847fa0f29fba0ad6f326a Mon Sep 17 00:00:00 2001
From: Nathan Sidwell <nathan@acm.org>
Date: Wed, 16 Dec 2020 09:38:53 -0800
Subject: [PATCH] C++: Fix solaris header use (mk 2)

There is another path to get to a poisoned bcopy.  Fixed thusly.

	gcc/cp/
	* mapper-resolver.cc: #include sys/socket before system.h
	due to poisoned bcopy use.
---
 gcc/cp/mapper-resolver.cc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gcc/cp/mapper-resolver.cc b/gcc/cp/mapper-resolver.cc
index 02ec48c61eab..8e968c525561 100644
--- a/gcc/cp/mapper-resolver.cc
+++ b/gcc/cp/mapper-resolver.cc
@@ -21,6 +21,12 @@ along with GCC; see the file COPYING3.  If not see
 /* Forward to the resolver in c++tools.  */
 
 #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 <sys/socket.h>
+#endif
+
 #define INCLUDE_ALGORITHM
 #include "system.h"
 
-- 
GitLab