aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/ncftp/main.c5
1 files changed, 5 insertions, 0 deletions
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;