From 9a9df97001814c87929826e6538762f3be07c4a4 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Mon, 9 Mar 2015 11:29:56 +0000 Subject: [PATCH] gdbserver/tracepoint: Add 'struct sockaddr_un *' -> 'struct sockaddr *' cast MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes this in C++ mode: gdb/gdbserver/tracepoint.c: In function ‘void* gdb_agent_helper_thread(void*)’: gdb/gdbserver/tracepoint.c:7190:47: error: cannot convert ‘sockaddr_un*’ to ‘sockaddr*’ for argument ‘2’ to ‘int accept(int, sockaddr*, socklen_t*)’ fd = accept (listen_fd, &sockaddr, &tmp); gdb/gdbserver/ChangeLog: 2015-03-09 Pedro Alves * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to 'struct sockaddr' pointer in 'accept' call. --- gdb/features/feature_to_c.sh | 0 gdb/gdbserver/ChangeLog | 5 +++++ gdb/gdbserver/tracepoint.c | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) mode change 100644 => 100755 gdb/features/feature_to_c.sh diff --git a/gdb/features/feature_to_c.sh b/gdb/features/feature_to_c.sh old mode 100644 new mode 100755 diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index e26f1231180..d611bfde132 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2015-03-09 Pedro Alves + + * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to + 'struct sockaddr' pointer in 'accept' call. + 2015-03-09 Pedro Alves Revert: diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c index 27fcf032479..42b27c072e0 100644 --- a/gdb/gdbserver/tracepoint.c +++ b/gdb/gdbserver/tracepoint.c @@ -7174,7 +7174,7 @@ gdb_agent_helper_thread (void *arg) do { - fd = accept (listen_fd, &sockaddr, &tmp); + fd = accept (listen_fd, (struct sockaddr *) &sockaddr, &tmp); } /* It seems an ERESTARTSYS can escape out of accept. */ while (fd == -512 || (fd == -1 && errno == EINTR)); -- 2.30.2