]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
loader: Reserve space for additional pointers in ast_module_info.
authorCorey Farrell <git@cfware.com>
Thu, 8 Feb 2018 19:23:35 +0000 (14:23 -0500)
committerCorey Farrell <git@cfware.com>
Wed, 21 Mar 2018 00:44:23 +0000 (20:44 -0400)
This creates 4 reserved pointers in case we need additional dependency
management fields.

Change-Id: If991ec99b779df1b2dfbd38ce1a0cd79f9e01821

include/asterisk/module.h

index faa4f7f67d22ea3062cb248e36cb7d3871ce4466..08b4c4317ce7e95bb2055067700dabe15f1f4ac8 100644 (file)
@@ -376,6 +376,13 @@ struct ast_module_info {
         */
        const char *enhances;
 
+       /*! These reserved fields should be NULL, they exist to allow addition to this
+        * structure in a non-breaking way. */
+       void *reserved1;
+       void *reserved2;
+       void *reserved3;
+       void *reserved4;
+
        /*! The support level for the given module */
        enum ast_module_support_level support_level;
 };
@@ -448,6 +455,10 @@ void __ast_module_unref(struct ast_module *mod, const char *file, int line, cons
                NULL,                                                          \
                NULL,                                                          \
                NULL,                                                          \
+               NULL,                                                          \
+               NULL,                                                          \
+               NULL,                                                          \
+               NULL,                                                          \
                support_level,                                                 \
        };                                                                 \
        static void  __attribute__((constructor)) __reg_module(void)       \