diff -pruN xdvik-22.84.14.orig/texk/xdvik/util.c xdvik-22.84.14/texk/xdvik/util.c --- xdvik-22.84.14.orig/texk/xdvik/util.c 2009-09-02 21:30:39.812675433 +0200 +++ xdvik-22.84.14/texk/xdvik/util.c 2008-05-03 21:45:10.000000000 +0200 @@ -273,7 +273,7 @@ try_open_mode(const char *fname, int fla int fd = open(fname, flags, mode); if (fd < 0 && (errno == EMFILE || errno == ENFILE)) { close_a_file(); - fd = open(fname, flags); + fd = open(fname, flags, mode); } return fd; }