aboutsummaryrefslogtreecommitdiff
path: root/gdb/configure.ac
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/configure.ac
parentcad26cec079bf79d078bb92ecc6b7cf1df2e5845 (diff)
downloadgdb-98a17ece013cb94cd602496b9efb92b8816b3953.zip
gdb-98a17ece013cb94cd602496b9efb92b8816b3953.tar.gz
gdb-98a17ece013cb94cd602496b9efb92b8816b3953.tar.bz2
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/configure.ac')
-rw-r--r--gdb/configure.ac10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/configure.ac b/gdb/configure.ac
index b2343a9..7d5e027 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1366,6 +1366,16 @@ GDB_AC_COMMON
# Check the return and argument types of ptrace.
GDB_AC_PTRACE
+dnl Check to see if sys/socket.h knows about AF_LOCAL
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+#include <sys/socket.h>
+]],
+ [[int x = AF_LOCAL]])],
+[AC_DEFINE([HAVE_AF_LOCAL], [1],
+ [Define to 1 if AF_LOCAL is defined or declared by sys/socket.h.])])
+
+
dnl AC_FUNC_SETPGRP does not work when cross compiling
dnl Instead, assume we will have a prototype for setpgrp if cross compiling.
if test "$cross_compiling" = no; then