heimdal: Use #ifdef HAVE_DLOPEN around functions and variables used by HAVE_DLOPEN

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
This commit is contained in:
Gary Lockyer
2017-09-25 13:58:10 +13:00
committed by Jeffrey Altman
parent 492910ec1e
commit 1c8cae58cc
2 changed files with 7 additions and 0 deletions

View File

@@ -37,6 +37,7 @@ struct _gss_mech_switch_list _gss_mechs = { NULL } ;
gss_OID_set _gss_mech_oids; gss_OID_set _gss_mech_oids;
static HEIMDAL_MUTEX _gss_mech_mutex = HEIMDAL_MUTEX_INITIALIZER; static HEIMDAL_MUTEX _gss_mech_mutex = HEIMDAL_MUTEX_INITIALIZER;
#ifdef HAVE_DLOPEN
/* /*
* Convert a string containing an OID in 'dot' form * Convert a string containing an OID in 'dot' form
* (e.g. 1.2.840.113554.1.2.2) to a gss_OID. * (e.g. 1.2.840.113554.1.2.2) to a gss_OID.
@@ -148,6 +149,7 @@ _gss_string_to_oid(const char* s, gss_OID oid)
return (0); return (0);
} }
#endif
#define SYM(name) \ #define SYM(name) \
do { \ do { \
@@ -227,6 +229,7 @@ void
_gss_load_mech(void) _gss_load_mech(void)
{ {
OM_uint32 major_status, minor_status; OM_uint32 major_status, minor_status;
#ifdef HAVE_DLOPEN
FILE *fp; FILE *fp;
char buf[256]; char buf[256];
char *p; char *p;
@@ -235,6 +238,7 @@ _gss_load_mech(void)
void *so; void *so;
gss_OID_desc mech_oid; gss_OID_desc mech_oid;
int found; int found;
#endif
HEIMDAL_MUTEX_lock(&_gss_mech_mutex); HEIMDAL_MUTEX_lock(&_gss_mech_mutex);

View File

@@ -209,6 +209,8 @@ struct plugin2 {
heim_dict_t names; heim_dict_t names;
}; };
#ifdef HAVE_DLOPEN
static void static void
plug_dealloc(void *ptr) plug_dealloc(void *ptr)
{ {
@@ -258,6 +260,7 @@ resolve_origin(const char *di)
#endif /* !HAVE_DLADDR */ #endif /* !HAVE_DLADDR */
} }
#endif /* HAVE_DLOPEN */
/** /**
* Load plugins (new system) for the given module @name (typically * Load plugins (new system) for the given module @name (typically