diff --git a/usr.bin/rpcgen/rpc_svcout.c b/usr.bin/rpcgen/rpc_svcout.c index 86ff5a260b94..b3eddf533e7b 100644 --- a/usr.bin/rpcgen/rpc_svcout.c +++ b/usr.bin/rpcgen/rpc_svcout.c @@ -769,12 +769,12 @@ write_msg_out(void) f_print(fout, "#ifdef RPC_SVC_FG\n"); if (inetdflag || pmflag) f_print(fout, "\tif (_rpcpmstart)\n"); - f_print(fout, "\t\tsyslog(LOG_ERR, msg);\n"); + f_print(fout, "\t\tsyslog(LOG_ERR, \"%%s\", msg);\n"); f_print(fout, "\telse\n"); f_print(fout, "\t\t(void) fprintf(stderr, \"%%s\\n\", msg);\n"); f_print(fout, "#else\n"); - f_print(fout, "\tsyslog(LOG_ERR, msg);\n"); + f_print(fout, "\tsyslog(LOG_ERR, \"%%s\", msg);\n"); f_print(fout, "#endif\n"); f_print(fout, "}\n"); }