* translate.cxx: While emitting systemtap_module_refresh(), protect
the printk diagnostics with #if defined(__KERNEL__).
o->newline() << "int state = atomic_read (session_state());";
o->newline() << "if (state != STAP_SESSION_RUNNING && state != STAP_SESSION_STARTING) {";
// cannot _stp_warn etc. since we're not in probe context
- o->newline(1) << "printk (KERN_ERR \"stap module notifier triggered in unexpected state %d\", state);";
+ o->newline(1) << "#if defined(__KERNEL__)";
+ o->newline() << "printk (KERN_ERR \"stap module notifier triggered in unexpected state %d\", state);";
+ o->newline() << "#endif";
o->newline() << "return;";
o->newline(-1) << "}";