+diff --git a/cinelerra-5.1/guicast/bcsignals.C b/cinelerra-5.1/guicast/bcsignals.C
+index ffc8a1c..ad11365 100644
+--- a/cinelerra-5.1/guicast/bcsignals.C
++++ b/cinelerra-5.1/guicast/bcsignals.C
+@@ -44,6 +44,7 @@
+ #include <sys/prctl.h>
+ #endif
+ #include <sys/types.h>
++#include <sys/wait.h>
+
+ BC_Signals* BC_Signals::global_signals = 0;
+ static int signal_done = 0;
+diff --git a/cinelerra-5.1/guicast/bctrace.C b/cinelerra-5.1/guicast/bctrace.C
+index 7e45392..2d08b46 100644
+--- a/cinelerra-5.1/guicast/bctrace.C
++++ b/cinelerra-5.1/guicast/bctrace.C
+@@ -309,7 +309,7 @@ void BC_Trace::dump_traces(FILE *fp)
+ }
+ }
+
+-void trace_info::set_owner() { owner = pthread_self(); }
++void trace_info::set_owner() { owner = (unsigned long)pthread_self(); }
+ void trace_info::unset_owner() { owner = 0; }
+
+ void BC_Trace::dump_locks(FILE *fp)
+@@ -322,7 +322,7 @@ void BC_Trace::dump_locks(FILE *fp)
+ fprintf(fp," %p %s, %s %p%s",
+ p->info, p->title, p->loc,
+ (void*)p->tid, p->is_owner ? " *" : "");
+- if( p->info->owner && p->info->owner != p->tid )
++ if( p->info->owner && p->info->owner != (unsigned long)p->tid )
+ fprintf(fp," %p", (void*)p->info->owner);
+ fprintf(fp,"\n");
+ }