This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] Check for socklen_t


Without this patch building GDB fails on at least Ultrix 4.0 and HP-UX
10.20.

Committed as obvious.

Mark

Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* ser-tcp.c: Tewak comment.
	[!HAVE_SOCKLEN_T]: Typedef socklen_t.
	* configure.ac: Add check for socklen_t.
	* configure, config.in: Regenerate.

Index: ser-tcp.c
===================================================================
RCS file: /cvs/src/src/gdb/ser-tcp.c,v
retrieving revision 1.22
diff -u -p -r1.22 ser-tcp.c
--- ser-tcp.c 26 May 2005 20:48:58 -0000 1.22
+++ ser-tcp.c 13 Jun 2005 21:28:51 -0000
@@ -1,5 +1,6 @@
-/* Serial interface for raw TCP connections on Un*x like systems
-   Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2001
+/* Serial interface for raw TCP connections on Un*x like systems.
+
+   Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2001, 2005
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -51,6 +52,10 @@
 #include <signal.h>
 #include "gdb_string.h"
 
+#ifndef HAVE_SOCKLEN_T
+typedef int socklen_t;
+#endif
+
 static int net_open (struct serial *scb, const char *name);
 static void net_close (struct serial *scb);
 void _initialize_ser_tcp (void);
Index: configure.ac
===================================================================
RCS file: /cvs/src/src/gdb/configure.ac,v
retrieving revision 1.20
diff -u -p -r1.20 configure.ac
--- configure.ac 20 May 2005 18:17:47 -0000 1.20
+++ configure.ac 13 Jun 2005 21:28:51 -0000
@@ -432,6 +432,10 @@ AC_CHECK_MEMBERS([struct stat.st_blksize
 # ------------------ #
 
 AC_TYPE_SIGNAL
+AC_CHECK_TYPES(socklen_t, [], [],
+[#include <sys/types.h>
+#include <sys/socket.h>
+])
 
 # ------------------------------------- #
 # Checks for compiler characteristics.  #


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]