diff --git a/usr.bin/ncftp/main.c b/usr.bin/ncftp/main.c index c1b17b810a2c..49adfa7c1597 100644 --- a/usr.bin/ncftp/main.c +++ b/usr.bin/ncftp/main.c @@ -460,10 +460,15 @@ int getuserinfo(void) else (void) Strncpy(uinfo.homedir, pw->pw_dir); cp = getenv("MAIL"); +#ifndef __FreeBSD__ if (cp == NULL) cp = getenv("mail"); if (cp == NULL) (void) sprintf(str, "/usr/spool/mail/%s", uinfo.username); +#else + if (cp == NULL) + (void) sprintf(str, "/var/mail/%s", uinfo.username); +#endif else (void) Strncpy(str, cp); cp = str;