diff --git a/lib/os/printk.c b/lib/os/printk.c index c7c276503e2..29d62b7749d 100644 --- a/lib/os/printk.c +++ b/lib/os/printk.c @@ -210,8 +210,9 @@ struct str_context { int count; }; -static int str_out(int c, struct str_context *ctx) +static int str_out(int c, void *context) { + struct str_context *ctx = context; if ((ctx->str == NULL) || (ctx->count >= ctx->max)) { ++ctx->count; return c;