diff --git a/src/compat/main.c b/src/compat/main.c index 69d3a51..6183a91 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;