diff --git a/libweston/launcher-direct.c b/libweston/launcher-direct.c index 4fc1c3c2..4e878a59 100644 --- a/libweston/launcher-direct.c +++ b/libweston/launcher-direct.c @@ -319,7 +319,7 @@ launcher_direct_get_vt(struct weston_launcher *base) return minor(s.st_rdev); } -struct launcher_interface launcher_direct_iface = { +const struct launcher_interface launcher_direct_iface = { launcher_direct_connect, launcher_direct_destroy, launcher_direct_open, diff --git a/libweston/launcher-impl.h b/libweston/launcher-impl.h index ba2cd8e4..404383ad 100644 --- a/libweston/launcher-impl.h +++ b/libweston/launcher-impl.h @@ -42,9 +42,9 @@ struct launcher_interface { }; struct weston_launcher { - struct launcher_interface *iface; + const struct launcher_interface *iface; }; -extern struct launcher_interface launcher_logind_iface; -extern struct launcher_interface launcher_weston_launch_iface; -extern struct launcher_interface launcher_direct_iface; +extern const struct launcher_interface launcher_logind_iface; +extern const struct launcher_interface launcher_weston_launch_iface; +extern const struct launcher_interface launcher_direct_iface; diff --git a/libweston/launcher-logind.c b/libweston/launcher-logind.c index 8b984a6e..c9cd75b7 100644 --- a/libweston/launcher-logind.c +++ b/libweston/launcher-logind.c @@ -837,7 +837,7 @@ launcher_logind_get_vt(struct weston_launcher *launcher) return wl->vtnr; } -struct launcher_interface launcher_logind_iface = { +const struct launcher_interface launcher_logind_iface = { launcher_logind_connect, launcher_logind_destroy, launcher_logind_open, diff --git a/libweston/launcher-util.c b/libweston/launcher-util.c index 2b828be8..fa3ed13b 100644 --- a/libweston/launcher-util.c +++ b/libweston/launcher-util.c @@ -35,7 +35,7 @@ #include #include -static struct launcher_interface *ifaces[] = { +static const struct launcher_interface *ifaces[] = { #ifdef HAVE_SYSTEMD_LOGIN &launcher_logind_iface, #endif @@ -48,10 +48,10 @@ WL_EXPORT struct weston_launcher * weston_launcher_connect(struct weston_compositor *compositor, int tty, const char *seat_id, bool sync_drm) { - struct launcher_interface **it; + const struct launcher_interface **it; for (it = ifaces; *it != NULL; it++) { - struct launcher_interface *iface = *it; + const struct launcher_interface *iface = *it; struct weston_launcher *launcher; if (iface->connect(&launcher, compositor, tty, seat_id, sync_drm) == 0) diff --git a/libweston/launcher-weston-launch.c b/libweston/launcher-weston-launch.c index 072d626e..0383550b 100644 --- a/libweston/launcher-weston-launch.c +++ b/libweston/launcher-weston-launch.c @@ -290,7 +290,7 @@ launcher_weston_launch_get_vt(struct weston_launcher *base) return minor(s.st_rdev); } -struct launcher_interface launcher_weston_launch_iface = { +const struct launcher_interface launcher_weston_launch_iface = { launcher_weston_launch_connect, launcher_weston_launch_destroy, launcher_weston_launch_open,