From: Pedro Alves Date: Mon, 9 Mar 2015 11:29:56 +0000 (+0000) Subject: gdbserver/tracepoint: Add 'struct sockaddr_un *' -> 'struct sockaddr *' cast X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9a9df97001814c87929826e6538762f3be07c4a4;p=binutils-gdb.git gdbserver/tracepoint: Add 'struct sockaddr_un *' -> 'struct sockaddr *' cast 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. --- 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));