diff options
Diffstat (limited to 'hw/xwin/winprefs.c')
-rw-r--r-- | hw/xwin/winprefs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/xwin/winprefs.c b/hw/xwin/winprefs.c index d6ec63099..c443c493b 100644 --- a/hw/xwin/winprefs.c +++ b/hw/xwin/winprefs.c @@ -789,7 +789,7 @@ LoadPreferences(void) char *home; char fname[PATH_MAX + NAME_MAX + 2]; char szDisplay[512]; - char *szEnvDisplay; + char *szEnvDisplay, *szEnvLogFile; int i, j; char param[PARAM_MAX + 1]; char *srcParam, *dstParam; @@ -838,7 +838,9 @@ LoadPreferences(void) } /* Setup XWINLOGFILE environment variable */ - setenv("XWINLOGFILE", g_pszLogFile, TRUE); + szEnvLogFile = (char *) (malloc(strlen(g_pszLogFile) + strlen("XWINLOGFILE=") + 1)); + snprintf(szEnvLogFile, 512, "XWINLOGFILE=%s", g_pszLogFile); + putenv(szEnvLogFile); /* Replace any "%display%" in menu commands with display string */ for (i = 0; i < pref.menuItems; i++) { |