Hui, > target_mourn_inferior (void) > { > struct target_ops *t; > + extern void reset_schedlock (); This sort of local declaration should *not* be used except under special circumstances. Declarations inside a .c, a fortiori inside a subprogram, are a maintenance hazard, because the compiler can not check for you that this declaration matches the actual definition. In other words, if someone changes the function profile, and forgets to update this call site, then you'll have a program that still compiles without warning, but whose execution becomes undefined. Another tiny detail is the fact that functions without arguments should have a "void" parameter, as opposed to nothing. In other words, replace: extern void reset_schedlock (); by: extern void reset_schedlock (void); Attached is a patch I just checked in to correct both issues. I also improved the original patch in terms of the comments. -- Joel