--- a/fileio.c
+++ b/fileio.c
@@ -23,6 +23,10 @@
 #include <string.h>
 #include <unistd.h>
 
+#ifndef DEFFILEMODE
+#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
+#endif
+
 #include "def.h"
 #include "kbd.h"
 #include "pathnames.h"
