Blame SOURCES/freeradius-Rename-lt_-symbols-to-fr_.patch

356795
From 31b815dedccaf3fcc21530614493ad4c0bf48ec1 Mon Sep 17 00:00:00 2001
356795
From: Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com>
356795
Date: Mon, 14 Nov 2016 13:08:59 +0200
356795
Subject: [PATCH] Rename lt_ symbols to fr_
356795
356795
Rename lt_ symbols to fr_ to avoid clashes with libltdl.
356795
---
356795
 src/include/modpriv.h         | 12 ++++++------
356795
 src/main/listen.c             | 10 +++++-----
356795
 src/main/modules.c            | 10 +++++-----
356795
 src/modules/rlm_eap/eap.c     |  4 ++--
356795
 src/modules/rlm_eap/rlm_eap.h |  2 +-
356795
 src/modules/rlm_sql/rlm_sql.c |  2 +-
356795
 6 files changed, 20 insertions(+), 20 deletions(-)
356795
356795
diff --git a/src/include/modpriv.h b/src/include/modpriv.h
356795
index 94d320e..446e204 100644
356795
--- a/src/include/modpriv.h
356795
+++ b/src/include/modpriv.h
356795
@@ -18,12 +18,12 @@
356795
 extern "C" {
356795
 #endif
356795
 
356795
-typedef void *lt_dlhandle;
356795
+typedef void *fr_dlhandle;
356795
 
356795
-lt_dlhandle lt_dlopenext(char const *name);
356795
-void *lt_dlsym(lt_dlhandle handle, char const *symbol);
356795
-int lt_dlclose(lt_dlhandle handle);
356795
-char const *lt_dlerror(void);
356795
+fr_dlhandle fr_dlopenext(char const *name);
356795
+void *fr_dlsym(fr_dlhandle handle, char const *symbol);
356795
+int fr_dlclose(fr_dlhandle handle);
356795
+char const *fr_dlerror(void);
356795
 
356795
 /*
356795
  *	Keep track of which modules we've loaded.
356795
@@ -31,7 +31,7 @@ char const *lt_dlerror(void);
356795
 typedef struct module_entry_t {
356795
 	char			name[MAX_STRING_LEN];
356795
 	module_t const		*module;
356795
-	lt_dlhandle		handle;
356795
+	fr_dlhandle		handle;
356795
 } module_entry_t;
356795
 
356795
 typedef struct fr_module_hup_t fr_module_hup_t;
356795
diff --git a/src/main/listen.c b/src/main/listen.c
356795
index 55e3f86..6c7e3f1 100644
356795
--- a/src/main/listen.c
356795
+++ b/src/main/listen.c
356795
@@ -2758,7 +2758,7 @@ static const FR_NAME_NUMBER listen_compare[] = {
356795
 	{ NULL, 0 },
356795
 };
356795
 
356795
-static int _free_proto_handle(lt_dlhandle *handle)
356795
+static int _free_proto_handle(fr_dlhandle *handle)
356795
 {
356795
 	dlclose(*handle);
356795
 	return 0;
356795
@@ -2771,7 +2771,7 @@ static rad_listen_t *listen_parse(CONF_SECTION *cs, char const *server)
356795
 	rad_listen_t	*this;
356795
 	CONF_PAIR	*cp;
356795
 	char const	*value;
356795
-	lt_dlhandle	handle;
356795
+	fr_dlhandle	handle;
356795
 	CONF_SECTION	*server_cs;
356795
 	char		buffer[32];
356795
 
356795
@@ -2790,10 +2790,10 @@ static rad_listen_t *listen_parse(CONF_SECTION *cs, char const *server)
356795
 	}
356795
 
356795
 	snprintf(buffer, sizeof(buffer), "proto_%s", value);
356795
-	handle = lt_dlopenext(buffer);
356795
+	handle = fr_dlopenext(buffer);
356795
 	if (handle) {
356795
 		fr_protocol_t	*proto;
356795
-		lt_dlhandle	*marker;
356795
+		fr_dlhandle	*marker;
356795
 
356795
 		proto = dlsym(handle, buffer);
356795
 		if (!proto) {
356795
@@ -2812,7 +2812,7 @@ static rad_listen_t *listen_parse(CONF_SECTION *cs, char const *server)
356795
 		/*
356795
 		 *	Ensure handle gets closed if config section gets freed
356795
 		 */
356795
-		marker = talloc(cs, lt_dlhandle);
356795
+		marker = talloc(cs, fr_dlhandle);
356795
 		*marker = handle;
356795
 		talloc_set_destructor(marker, _free_proto_handle);
356795
 
356795
diff --git a/src/main/modules.c b/src/main/modules.c
356795
index 7a593e1..3bd7239 100644
356795
--- a/src/main/modules.c
356795
+++ b/src/main/modules.c
356795
@@ -140,7 +140,7 @@ static int check_module_magic(CONF_SECTION *cs, module_t const *module)
356795
 	return 0;
356795
 }
356795
 
356795
-lt_dlhandle lt_dlopenext(char const *name)
356795
+fr_dlhandle fr_dlopenext(char const *name)
356795
 {
356795
 	int flags = RTLD_NOW;
356795
 	void *handle;
356795
@@ -224,19 +224,19 @@ lt_dlhandle lt_dlopenext(char const *name)
356795
 	return dlopen(buffer, flags);
356795
 }
356795
 
356795
-void *lt_dlsym(lt_dlhandle handle, UNUSED char const *symbol)
356795
+void *fr_dlsym(fr_dlhandle handle, UNUSED char const *symbol)
356795
 {
356795
 	return dlsym(handle, symbol);
356795
 }
356795
 
356795
-int lt_dlclose(lt_dlhandle handle)
356795
+int fr_dlclose(fr_dlhandle handle)
356795
 {
356795
 	if (!handle) return 0;
356795
 
356795
 	return dlclose(handle);
356795
 }
356795
 
356795
-char const *lt_dlerror(void)
356795
+char const *fr_dlerror(void)
356795
 {
356795
 	return dlerror();
356795
 }
356795
@@ -472,7 +472,7 @@ static module_entry_t *linkto_module(char const *module_name,
356795
 	/*
356795
 	 *	Keep the handle around so we can dlclose() it.
356795
 	 */
356795
-	handle = lt_dlopenext(module_name);
356795
+	handle = fr_dlopenext(module_name);
356795
 	if (!handle) {
356795
 		cf_log_err_cs(cs,
356795
 			   "Failed to link to module '%s': %s\n",
356795
diff --git a/src/modules/rlm_eap/eap.c b/src/modules/rlm_eap/eap.c
356795
index be3e420..25316ea 100644
356795
--- a/src/modules/rlm_eap/eap.c
356795
+++ b/src/modules/rlm_eap/eap.c
356795
@@ -130,9 +130,9 @@ int eap_module_load(rlm_eap_t *inst, eap_module_t **m_inst, eap_type_t num, CONF
356795
 	/*
356795
 	 *	Link the loaded EAP-Type
356795
 	 */
356795
-	method->handle = lt_dlopenext(mod_name);
356795
+	method->handle = fr_dlopenext(mod_name);
356795
 	if (!method->handle) {
356795
-		ERROR("rlm_eap (%s): Failed to link %s: %s", inst->xlat_name, mod_name, lt_dlerror());
356795
+		ERROR("rlm_eap (%s): Failed to link %s: %s", inst->xlat_name, mod_name, fr_dlerror());
356795
 
356795
 		return -1;
356795
 	}
356795
diff --git a/src/modules/rlm_eap/rlm_eap.h b/src/modules/rlm_eap/rlm_eap.h
356795
index 409f104..17c452a 100644
356795
--- a/src/modules/rlm_eap/rlm_eap.h
356795
+++ b/src/modules/rlm_eap/rlm_eap.h
356795
@@ -36,7 +36,7 @@ RCSIDH(rlm_eap_h, "$Id$")
356795
 typedef struct eap_module {
356795
 	char const		*name;
356795
 	rlm_eap_module_t	*type;
356795
-	lt_dlhandle		handle;
356795
+	fr_dlhandle		handle;
356795
 	CONF_SECTION		*cs;
356795
 	void			*instance;
356795
 } eap_module_t;
356795
diff --git a/src/modules/rlm_sql/rlm_sql.c b/src/modules/rlm_sql/rlm_sql.c
356795
index aaf2ed4..bee6758 100644
356795
--- a/src/modules/rlm_sql/rlm_sql.c
356795
+++ b/src/modules/rlm_sql/rlm_sql.c
356795
@@ -816,7 +816,7 @@ static int mod_instantiate(CONF_SECTION *conf, void *instance)
356795
 	/*
356795
 	 *	Load the appropriate driver for our database
356795
 	 */
356795
-	inst->handle = lt_dlopenext(inst->config->sql_driver_name);
356795
+	inst->handle = fr_dlopenext(inst->config->sql_driver_name);
356795
 	if (!inst->handle) {
356795
 		ERROR("Could not link driver %s: %s",
356795
 		       inst->config->sql_driver_name,
356795
-- 
356795
2.10.2
356795