diff -urN freeradius-server-2.1.8/libltdl/ltdl.c freeradiusd-gnucleanup/libltdl/ltdl.c
--- freeradius-server-2.1.8/libltdl/ltdl.c	2009-12-30 07:44:35.000000000 -0800
+++ freeradiusd-gnucleanup/libltdl/ltdl.c	2010-04-21 10:07:37.860250500 -0700
@@ -2442,12 +2442,13 @@
 
   while (loader)
     {
+    lt_user_data data;
       if (useloader && strcmp(loader->loader_name, useloader))
 	{
 	  loader = loader->next;
 	  continue;
 	}
-      lt_user_data data = loader->dlloader_data;
+	data = loader->dlloader_data;
 
       cur->module = loader->module_open (data, filename);
 
diff -urN freeradius-server-2.1.8/src/main/auth.c freeradiusd-gnucleanup/src/main/auth.c
--- freeradius-server-2.1.8/src/main/auth.c	2009-12-30 07:44:35.000000000 -0800
+++ freeradiusd-gnucleanup/src/main/auth.c	2010-04-21 10:07:49.141283900 -0700
@@ -175,9 +175,10 @@
 	 */
 	cur_config_item = request->config_items;
 	while(((auth_type_pair = pairfind(cur_config_item, PW_AUTH_TYPE))) != NULL) {
+		DICT_VALUE *dv = NULL;
 		auth_type = auth_type_pair->vp_integer;
 		auth_type_count++;
-		DICT_VALUE *dv = dict_valbyattr(auth_type_pair->attribute,
+		dv = dict_valbyattr(auth_type_pair->attribute,
 						auth_type_pair->vp_integer);
 
 		RDEBUG2("Found Auth-Type = %s",
diff -urN freeradius-server-2.1.8/src/main/command.c freeradiusd-gnucleanup/src/main/command.c
--- freeradius-server-2.1.8/src/main/command.c	2009-12-30 07:44:35.000000000 -0800
+++ freeradiusd-gnucleanup/src/main/command.c	2010-04-21 10:07:57.469249000 -0700
@@ -842,7 +842,7 @@
 		return 0;
 	}
 
-	cf_section2file(fp, client->cs);
+	cf_section2file(fp, (CONF_SECTION*)client->cs);
 	fclose(fp);
 
 	return 1;
diff -urN freeradius-server-2.1.8/src/main/listen.c freeradiusd-gnucleanup/src/main/listen.c
--- freeradius-server-2.1.8/src/main/listen.c	2009-12-30 07:44:35.000000000 -0800
+++ freeradiusd-gnucleanup/src/main/listen.c	2010-04-21 10:08:11.750224800 -0700
@@ -126,7 +126,7 @@
 			last_printed = now;
 		}
 
-		listener->print(listener, name, sizeof(name));
+		listener->print((rad_listen_t*)listener, name, sizeof(name));
 
 		radlog(L_ERR, "Ignoring request to %s from unknown client %s port %d",
 		       name, inet_ntop(ipaddr->af, &ipaddr->ipaddr,
@@ -206,7 +206,7 @@
 	request = request_alloc();
 	if (!request) goto unknown;
 
-	request->listener = listener;
+	request->listener = (rad_listen_t*)listener;
 	request->client = client;
 	request->packet = rad_recv(listener->fd, 0x02); /* MSG_PEEK */
 	if (!request->packet) {				/* badly formed, etc */
diff -urN freeradius-server-2.1.8/src/main/log.c freeradiusd-gnucleanup/src/main/log.c
--- freeradius-server-2.1.8/src/main/log.c	2009-12-30 07:44:35.000000000 -0800
+++ freeradiusd-gnucleanup/src/main/log.c	2010-04-21 10:08:18.125102400 -0700
@@ -384,7 +384,7 @@
 			s[1] = '\0';
 		}
 		
-		s = fr_int2str(levels, (lvl & ~L_CONS), ": ");
+		s =  (char *) fr_int2str(levels, (lvl & ~L_CONS), ": ");
 		
 		strcat(buffer, s);
 		len = strlen(buffer);
diff -urN freeradius-server-2.1.8/src/main/xlat.c freeradiusd-gnucleanup/src/main/xlat.c
--- freeradius-server-2.1.8/src/main/xlat.c	2009-12-30 07:44:35.000000000 -0800
+++ freeradiusd-gnucleanup/src/main/xlat.c	2010-04-21 10:08:28.843646600 -0700
@@ -572,7 +572,7 @@
 		 *	Register the internal packet xlat's.
 		 */
 		for (i = 0; internal_xlat[i] != NULL; i++) {
-			xlat_register(internal_xlat[i], xlat_packet, &xlat_inst[i]);
+			xlat_register(internal_xlat[i], xlat_packet, (void*)&xlat_inst[i]);
 			c = xlat_find(internal_xlat[i]);
 			rad_assert(c != NULL);
 			c->internal = TRUE;
@@ -581,7 +581,7 @@
 		/*
 		 *	New name: "control"
 		 */
-		xlat_register("control", xlat_packet, &xlat_inst[0]);
+		xlat_register("control", xlat_packet, (void*)&xlat_inst[0]);
 		c = xlat_find("control");
 		rad_assert(c != NULL);
 		c->internal = TRUE;
@@ -593,7 +593,7 @@
 		buffer[1] = '\0';
 		for (i = 0; i <= REQUEST_MAX_REGEX; i++) {
 			buffer[0] = '0' + i;
-			xlat_register(buffer, xlat_regex, &xlat_inst[i]);
+			xlat_register(buffer, xlat_regex, (void*)&xlat_inst[i]);
 			c = xlat_find(buffer);
 			rad_assert(c != NULL);
 			c->internal = TRUE;
@@ -601,12 +601,12 @@
 #endif /* HAVE_REGEX_H */
 
 
-		xlat_register("debug", xlat_debug, &xlat_inst[0]);
+		xlat_register("debug", xlat_debug, (void*)&xlat_inst[0]);
 		c = xlat_find("debug");
 		rad_assert(c != NULL);
 		c->internal = TRUE;
 
-		xlat_register("md5", xlat_md5, &xlat_inst[0]);
+		xlat_register("md5", xlat_md5, (void*)&xlat_inst[0]);
 		c = xlat_find("md5");
 		rad_assert(c != NULL);
 		c->internal = TRUE;
diff -urN freeradius-server-2.1.8/src/modules/rlm_dbm/rlm_dbm.c freeradiusd-gnucleanup/src/modules/rlm_dbm/rlm_dbm.c
--- freeradius-server-2.1.8/src/modules/rlm_dbm/rlm_dbm.c	2009-12-30 07:44:35.000000000 -0800
+++ freeradiusd-gnucleanup/src/modules/rlm_dbm/rlm_dbm.c	2010-04-21 10:08:35.749764000 -0700
@@ -206,7 +206,7 @@
    	 				if ( parse_state == SMP_PATTERN ) { /* pattern line found */
    	 					DEBUG2("process pattern");
    	 					/* check pattern against request */
-						if ( paircompare(req, request, vp, reply ) == 0 ) {
+						if ( paircompare(req, (VALUE_PAIR*)request, vp, reply ) == 0 ) {
 							DEBUG2("rlm_dbm: Pattern matched, look for request");
    	 						pairmove(&tmp_config, &vp);
    	 						pairfree(&vp);
diff -urN freeradius-server-2.1.8/src/modules/rlm_policy/parse.c freeradiusd-gnucleanup/src/modules/rlm_policy/parse.c
--- freeradius-server-2.1.8/src/modules/rlm_policy/parse.c	2009-12-30 07:44:35.000000000 -0800
+++ freeradiusd-gnucleanup/src/modules/rlm_policy/parse.c	2010-04-21 10:08:43.218370600 -0700
@@ -1532,7 +1532,7 @@
 	}
 
 	if ((lexer->debug & POLICY_DEBUG_PRINT_POLICY) != 0) {
-		rlm_policy_print(this);
+		rlm_policy_print((policy_item_t*)this);
 	}
 
        	return 1;
