summaryrefslogtreecommitdiff
path: root/gdb/common
diff options
context:
space:
mode:
authorJohn Darrington <john@darrington.wattle.id.au>2018-10-28 20:14:24 +0100
committerJohn Darrington <john@darrington.wattle.id.au>2018-10-29 08:07:32 +0100
commit98a17ece013cb94cd602496b9efb92b8816b3953 (patch)
tree76d29d19120d65522515968a16d15a779107c371 /gdb/common
parentcad26cec079bf79d078bb92ecc6b7cf1df2e5845 (diff)
downloadbinutils-gdb-98a17ece013cb94cd602496b9efb92b8816b3953.tar.gz
GDB: Only build for "unix:" connections if AF_LOCAL is supported.
Commit f19c7ff839d7a32ebb48482ae7d318fb46ca823d added a new member to the prefixes array which included a use of the symbol AF_LOCAL. Unfortunately, not all systems declare this symbol. This change only compiles the "unix:" member if the system knows about AF_LOCAL. gdb/ChangeLog: * configure.ac: New test HAVE_AF_LOCAL * common/netstuff.c (parse_connection_spec) [prefixes]: Only compile "unix:" if HAVE_AF_LOCAL is true. * configure: regenerate. * config.in: regenerate.
Diffstat (limited to 'gdb/common')
-rw-r--r--gdb/common/netstuff.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/common/netstuff.c b/gdb/common/netstuff.c
index 11182c1e87e..56bcdfca72e 100644
--- a/gdb/common/netstuff.c
+++ b/gdb/common/netstuff.c
@@ -145,7 +145,9 @@ parse_connection_spec (const char *spec, struct addrinfo *hint)
{ "tcp4:", AF_INET, SOCK_STREAM },
{ "udp6:", AF_INET6, SOCK_DGRAM },
{ "tcp6:", AF_INET6, SOCK_STREAM },
+#if HAVE_AF_LOCAL
{ "unix:", AF_LOCAL, SOCK_STREAM },
+#endif
};
for (const host_prefix prefix : prefixes)