diff --git a/src/mime/backend/common.c b/src/mime/backend/common.c index 33ae01e79..a103c1994 100644 --- a/src/mime/backend/common.c +++ b/src/mime/backend/common.c @@ -24,7 +24,7 @@ #include "mime/backend/mailcap.h" #include "mime/backend/mimetypes.h" -static struct mime_backend *mime_backends[] = { +static const struct mime_backend *const mime_backends[] = { &default_mime_backend, #ifdef CONFIG_MAILCAP &mailcap_mime_backend, @@ -39,7 +39,7 @@ static struct mime_backend *mime_backends[] = { unsigned char * get_content_type_backends(unsigned char *extension) { - struct mime_backend *backend; + const struct mime_backend *backend; int i; foreach_module (backend, mime_backends, i) { @@ -57,7 +57,7 @@ get_content_type_backends(unsigned char *extension) struct mime_handler * get_mime_handler_backends(unsigned char *ctype, int have_x) { - struct mime_backend *backend; + const struct mime_backend *backend; int i; foreach_module (backend, mime_backends, i) { diff --git a/src/mime/backend/default.c b/src/mime/backend/default.c index 3cbc7852c..30f273194 100644 --- a/src/mime/backend/default.c +++ b/src/mime/backend/default.c @@ -206,7 +206,7 @@ get_mime_handler_default(unsigned char *type, int have_x) } -struct mime_backend default_mime_backend = { +const struct mime_backend default_mime_backend = { /* get_content_type: */ get_content_type_default, /* get_mime_handler: */ get_mime_handler_default, }; diff --git a/src/mime/backend/default.h b/src/mime/backend/default.h index 041f9799a..734531073 100644 --- a/src/mime/backend/default.h +++ b/src/mime/backend/default.h @@ -5,7 +5,7 @@ #include "main/module.h" #include "mime/backend/common.h" -extern struct mime_backend default_mime_backend; +extern const struct mime_backend default_mime_backend; extern struct module default_mime_module; #endif diff --git a/src/mime/backend/mailcap.c b/src/mime/backend/mailcap.c index 3bdd2ca19..aaa17b3fb 100644 --- a/src/mime/backend/mailcap.c +++ b/src/mime/backend/mailcap.c @@ -661,7 +661,7 @@ get_mime_handler_mailcap(unsigned char *type, int options) } -struct mime_backend mailcap_mime_backend = { +const struct mime_backend mailcap_mime_backend = { /* get_content_type: */ NULL, /* get_mime_handler: */ get_mime_handler_mailcap, }; diff --git a/src/mime/backend/mailcap.h b/src/mime/backend/mailcap.h index ce5762498..bf81fd37d 100644 --- a/src/mime/backend/mailcap.h +++ b/src/mime/backend/mailcap.h @@ -5,7 +5,7 @@ #include "main/module.h" #include "mime/backend/common.h" -extern struct mime_backend mailcap_mime_backend; +extern const struct mime_backend mailcap_mime_backend; extern struct module mailcap_mime_module; #endif diff --git a/src/mime/backend/mimetypes.c b/src/mime/backend/mimetypes.c index 2b4d8ba62..b9e0b59ca 100644 --- a/src/mime/backend/mimetypes.c +++ b/src/mime/backend/mimetypes.c @@ -270,7 +270,7 @@ get_content_type_mimetypes(unsigned char *extension) return NULL; } -struct mime_backend mimetypes_mime_backend = { +const struct mime_backend mimetypes_mime_backend = { /* get_content_type: */ get_content_type_mimetypes, /* get_mime_handler: */ NULL, }; diff --git a/src/mime/backend/mimetypes.h b/src/mime/backend/mimetypes.h index c5b9eebb4..f6a188c5d 100644 --- a/src/mime/backend/mimetypes.h +++ b/src/mime/backend/mimetypes.h @@ -5,7 +5,7 @@ #include "main/module.h" #include "mime/backend/common.h" -extern struct mime_backend mimetypes_mime_backend; +extern const struct mime_backend mimetypes_mime_backend; extern struct module mimetypes_mime_module; #endif