aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2020-12-16 11:53:27 -0800
committerNathan Sidwell <nathan@acm.org>2020-12-16 11:57:31 -0800
commitb7b6879f0b5c2a40779df50651d20bd39d89bcc5 (patch)
tree9e68c37eb92c4326e1459cd96ad61a220f4f75dd /gcc
parent8d8bb85b48693a8a8a26e03ea4469888a1170f01 (diff)
downloadgcc-b7b6879f0b5c2a40779df50651d20bd39d89bcc5.zip
gcc-b7b6879f0b5c2a40779df50651d20bd39d89bcc5.tar.gz
gcc-b7b6879f0b5c2a40779df50651d20bd39d89bcc5.tar.bz2
c++: Another solaris header use [PR 98315]
Rather than early-include sys/socket.h, let's allow the includer to tell cody no networking. libcody/ * cody.hh: Allow user to set CODY_NETWORKING. gcc/cp/ * mapper-resolver.cc: Remove early include of sys/socket.h. Specify no CODY_NETWORKING instead. * module.cc: Specify no CODY_NETWORKING.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/mapper-resolver.cc8
-rw-r--r--gcc/cp/module.cc3
2 files changed, 4 insertions, 7 deletions
diff --git a/gcc/cp/mapper-resolver.cc b/gcc/cp/mapper-resolver.cc
index 8e968c5..53c4824 100644
--- a/gcc/cp/mapper-resolver.cc
+++ b/gcc/cp/mapper-resolver.cc
@@ -21,13 +21,9 @@ 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"
+// We don't want or need to be aware of networking
+#define CODY_NETWORKING 0
#include "../../c++tools/resolver.cc"
diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc
index e9ea186..2318489 100644
--- a/gcc/cp/module.cc
+++ b/gcc/cp/module.cc
@@ -207,7 +207,6 @@ Classes used:
#define _DEFAULT_SOURCE 1 /* To get TZ field of struct tm, if available. */
#include "config.h"
-
#include "system.h"
#include "coretypes.h"
#include "cp-tree.h"
@@ -229,6 +228,8 @@ Classes used:
#include "attribs.h"
#include "intl.h"
#include "langhooks.h"
+/* This TU doesn't need or want to see the networking. */
+#define CODY_NETWORKING 0
#include "mapper-client.h"
#if HAVE_MMAP_FILE && _POSIX_MAPPED_FILES > 0