--- src.orig/kernel/qapplication_qws.cpp	Mon Mar 18 02:11:25 2002
+++ src/kernel/qapplication_qws.cpp	Fri Aug 30 04:48:23 2002
@@ -1458,11 +1458,7 @@
 	qt_appType = type;
 	qws_single_process = TRUE;
 	QWSServer::startup(flags);
-	QString strEnv( "QWS_DISPLAY=" );
-	strEnv += qws_display_spec;
-	char p[strEnv.length() + 1];
-	strncpy( p, strEnv.latin1(), strEnv.length() );
-	putenv( p );
+	setenv( "QWS_DISPLAY", qws_display_spec, 1 );
     }
 
     if( qt_is_gui_used )