aboutsummaryrefslogtreecommitdiff
path: root/libcody
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 /libcody
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 'libcody')
-rw-r--r--libcody/cody.hh4
1 files changed, 4 insertions, 0 deletions
diff --git a/libcody/cody.hh b/libcody/cody.hh
index 31d9c18..789ce9e 100644
--- a/libcody/cody.hh
+++ b/libcody/cody.hh
@@ -5,6 +5,9 @@
#ifndef CODY_HH
#define CODY_HH 1
+// If the user specifies this as non-zero, it must be what we expect,
+// generally only good for requesting no networking
+#if !defined (CODY_NETWORKING)
// Have a known-good list of networking systems
#if defined (__unix__) || defined (__MACH__)
#define CODY_NETWORKING 1
@@ -15,6 +18,7 @@
#undef CODY_NETWORKING
#define CODY_NETWORKING 0
#endif
+#endif
// C++
#include <memory>