Some hosts don't have TIOCSCTTY. Don't try to use it on them.
[sgt/putty] / unix / uxstore.c
index c46b9a2..85d72ca 100644 (file)
@@ -85,6 +85,8 @@ static void make_filename(char *filename, int index, const char *subname)
     char *home;
     int len;
     home = getenv("HOME");
+    if (!home)
+        home="/";
     strncpy(filename, home, FILENAME_MAX);
     len = strlen(filename);
     if (index == INDEX_SESSION) {