$OpenBSD: patch-rdesktop_c,v 1.2 2012/03/14 18:36:04 gsoares Exp $

fix build with gcc-2.95

--- rdesktop.c.orig	Fri Nov 25 08:03:03 2011
+++ rdesktop.c	Tue Mar 13 13:53:08 2012
@@ -473,6 +473,7 @@ main(int argc, char *argv[])
 	char *locale = NULL;
 	int username_option = 0;
 	RD_BOOL geometry_option = False;
+	struct sigaction act;
 #ifdef WITH_RDPSND
 	char *rdpsnd_optarg = NULL;
 #endif
@@ -488,7 +489,6 @@ main(int argc, char *argv[])
 #endif
 
 	/* Ignore SIGPIPE, since we are using popen() */
-	struct sigaction act;
 	memset(&act, 0, sizeof(act));
 	act.sa_handler = SIG_IGN;
 	sigemptyset(&act.sa_mask);
@@ -901,6 +901,7 @@ main(int argc, char *argv[])
 
 	if (!username_option)
 	{
+		int pwlen;
 		pw = getpwuid(getuid());
 		if ((pw == NULL) || (pw->pw_name == NULL))
 		{
@@ -908,7 +909,7 @@ main(int argc, char *argv[])
 			return EX_OSERR;
 		}
 		/* +1 for trailing \0 */
-		int pwlen = strlen(pw->pw_name) + 1;
+		pwlen = strlen(pw->pw_name) + 1;
 		g_username = (char *) xmalloc(pwlen);
 		STRNCPY(g_username, pw->pw_name, pwlen);
 	}
