From: Andrew Bartlett Date: Wed, 27 May 2020 10:18:31 +0000 (+1200) Subject: heimdal: Exclude more of plugin.c if HAVE_DLOPEN (which Samba unsets) is not set X-Git-Tag: talloc-2.3.2~912 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1663ada9751d35f10c92149801c5b209b0361ac1;p=thirdparty%2Fsamba.git heimdal: Exclude more of plugin.c if HAVE_DLOPEN (which Samba unsets) is not set This allows us to avoid warnings and errors due to unsued variables and functions. Signed-off-by: Andrew Bartlett Reviewed-by: Douglas Bagnall --- diff --git a/source4/heimdal/lib/krb5/plugin.c b/source4/heimdal/lib/krb5/plugin.c index 230bd637abc..0203d04451d 100644 --- a/source4/heimdal/lib/krb5/plugin.c +++ b/source4/heimdal/lib/krb5/plugin.c @@ -61,6 +61,8 @@ struct plugin { static HEIMDAL_MUTEX plugin_mutex = HEIMDAL_MUTEX_INITIALIZER; static struct plugin *registered = NULL; + +#ifdef HAVE_DLOPEN static int plugins_needs_scan = 1; static const char *sysplugin_dirs[] = { @@ -71,6 +73,8 @@ static const char *sysplugin_dirs[] = { NULL }; +#endif /* HAVE_DLOPEN */ + /* * */ @@ -179,6 +183,8 @@ krb5_plugin_register(krb5_context context, return 0; } +#ifdef HAVE_DLOPEN + static int is_valid_plugin_filename(const char * n) { @@ -230,8 +236,6 @@ load_plugins(krb5_context context) return 0; plugins_needs_scan = 0; -#ifdef HAVE_DLOPEN - dirs = krb5_config_get_strings(context, NULL, "libdefaults", "plugin_dir", NULL); if (dirs == NULL) @@ -297,10 +301,19 @@ load_plugins(krb5_context context) } if (dirs != rk_UNCONST(sysplugin_dirs)) krb5_config_free_strings(dirs); -#endif /* HAVE_DLOPEN */ return 0; } +#else /* HAVE_DLOPEN */ + +static krb5_error_code +load_plugins(krb5_context context) +{ + return 0; +} + +#endif /* HAVE_DLOPEN */ + static krb5_error_code add_symbol(krb5_context context, struct krb5_plugin **list, void *symbol) {