I had a look at this file, there's the small patch that just wraps the wholesection of function declarations with ifdef __KERNEL, or the larger patchthat does the wrapping _and_ adds the missing externs to make it obvious.

But I'm not sure that there is agreement regarding adding the externs too.