http://bugs.winehq.org/show_bug.cgi?id=16734
Summary: get_ptrace_tid defined but not used on OpenBSD Product: Wine Version: 1.1.12 Platform: PC OS/Version: OpenBSD Status: NEW Keywords: patch, source Severity: trivial Priority: P2 Component: build-env AssignedTo: wine-bugs@winehq.org ReportedBy: austinenglish@gmail.com
ccache gcc -c -I. -I. -I../include -I../include -D__WINESRC__ -Wall -pipe -fno-strict-aliasing -Wwrite-strings -Wpointer-arith -I/usr/local/include -g -O2 -o ptrace.o ptrace.c ptrace.c:174: warning: `get_ptrace_tid' defined but not used
There's an '#ifdef linux' on the same code a few lines earlier (in get_ptrace_tid), which fixes compile here as well:
diff --git a/server/ptrace.c b/server/ptrace.c index b446de9..92b7db5 100644 --- a/server/ptrace.c +++ b/server/ptrace.c @@ -172,7 +172,9 @@ static int get_ptrace_pid( struct thread *thread ) /* return the Unix tid to use in ptrace calls for a given thread */ static int get_ptrace_tid( struct thread *thread ) { +#ifdef linux if (thread->unix_tid != -1) return thread->unix_tid; +#endif return thread->unix_pid; }
but I'm not sure if that's right or not. Comments welcome.