diff options
-rw-r--r-- | lib/util/util.h | 5 | ||||
-rw-r--r-- | lib/util/util_strlist.c | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/util/util.h b/lib/util/util.h index e7ea0ba527..729190af63 100644 --- a/lib/util/util.h +++ b/lib/util/util.h @@ -535,6 +535,11 @@ _PUBLIC_ const char **str_list_add_const(const char **list, const char *s); _PUBLIC_ const char **str_list_copy_const(TALLOC_CTX *mem_ctx, const char **list); +/** + * Needed for making an "unconst" list "const" + */ +_PUBLIC_ const char **const_str_list(char **list); + /* The following definitions come from lib/util/util_file.c */ diff --git a/lib/util/util_strlist.c b/lib/util/util_strlist.c index 71998b9a5c..6d1a695987 100644 --- a/lib/util/util_strlist.c +++ b/lib/util/util_strlist.c @@ -486,3 +486,12 @@ _PUBLIC_ const char **str_list_copy_const(TALLOC_CTX *mem_ctx, ret[i] = NULL; return ret; } + +/** + * Needed for making an "unconst" list "const" + */ +_PUBLIC_ const char **const_str_list(char **list) +{ + return (const char **)list; +} + |