diff --git a/src/compat/main.c b/src/compat/main.c index 593d5ef..faeaadc 100644 --- a/src/compat/main.c +++ b/src/compat/main.c @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -167,6 +168,11 @@ main( int argc, char **argv ) /* defaults */ /* XXX the precedence is borked: it's defaults < cmdline < file instead of defaults < file < cmdline */ +#ifdef BSD + global.user = getenv( "USER" ); +#else + global.user = getenv( "LOGNAME" ); +#endif global.port = 143; global.box = "INBOX"; global.use_namespace = 1;