Use const char * in struct xkb_rule_names
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
diff --git a/include/X11/extensions/XKBcommon.h b/include/X11/extensions/XKBcommon.h
index 96203aa..c245550 100644
--- a/include/X11/extensions/XKBcommon.h
+++ b/include/X11/extensions/XKBcommon.h
@@ -83,11 +83,11 @@ typedef unsigned char KeyCode;
#define XkmLastIndex XkmVirtualModsIndex
struct xkb_rule_names {
- char * rules;
- char * model;
- char * layout;
- char * variant;
- char * options;
+ const char * rules;
+ const char * model;
+ const char * layout;
+ const char * variant;
+ const char * options;
};
struct xkb_any_action {
diff --git a/src/xkbcomp/xkbcomp.c b/src/xkbcomp/xkbcomp.c
index 3a5d5bf..53e6ca5 100644
--- a/src/xkbcomp/xkbcomp.c
+++ b/src/xkbcomp/xkbcomp.c
@@ -146,10 +146,10 @@ xkb_compile_keymap_from_rules(const struct xkb_rule_names *rmlvo)
return NULL;
}
- defs.model = rmlvo->model;
- defs.layout = rmlvo->layout;
- defs.variant = rmlvo->variant;
- defs.options = rmlvo->options;
+ defs.model = (char *) rmlvo->model;
+ defs.layout = (char *) rmlvo->layout;
+ defs.variant = (char *) rmlvo->variant;
+ defs.options = (char *) rmlvo->options;
names = XkbComponentsFromRules(rmlvo->rules, &defs);
if (!names) {