diff --git a/files.c b/files.c
index d31fcdc5f10eb5f560488a69144ddfe7ffe04218..bb0d35ddf76793ebd5fa73b558689c80f848dd9b 100644
--- a/files.c
+++ b/files.c
@@ -1148,7 +1148,7 @@ int write_file(char *name, int tmp, int append, int nonamechange)
 	    return -1;
 	} else if (size > 0) {
 #ifndef NANO_SMALL
-	    if (ISSET(DOS_FILE)) {
+	    if (ISSET(DOS_FILE) || ISSET(MAC_FILE)) {
 		size = write(fd, "\r", 1);
 		lineswritten++;
 		if (size == -1) {