diff --git a/lib/format_text/text_label.c b/lib/format_text/text_label.c index 468f593b7..1f8325f0f 100644 --- a/lib/format_text/text_label.c +++ b/lib/format_text/text_label.c @@ -660,7 +660,7 @@ static void _fmt_text_destroy(struct labeller *l) free(l); } -struct label_ops _text_ops = { +const struct label_ops _text_ops = { .can_handle = _text_can_handle, .write = _text_write, .read = _text_read, diff --git a/lib/label/label.h b/lib/label/label.h index 26784c3e8..be193f915 100644 --- a/lib/label/label.h +++ b/lib/label/label.h @@ -84,7 +84,7 @@ struct label_ops { }; struct labeller { - struct label_ops *ops; + const struct label_ops *ops; const struct format_type *fmt; };