]> git.lyx.org Git - lyx.git/blobdiff - src/support/tempname.C
MacOSX compile fix.
[lyx.git] / src / support / tempname.C
index 54833b5b47d28b41dda8a588bcee8795fc9978ec..86f968d58b436bd237fde526b200c0a7061172a5 100644 (file)
@@ -54,6 +54,10 @@ int make_tempfile(char * templ)
        // This probably just barely works...
        ::mktemp(templ);
 # if defined (HAVE_OPEN)
+# if (!defined S_IRUSR)
+#   define S_IRUSR S_IREAD
+#   define S_IWUSR S_IWRITE
+# endif
        return ::open(templ, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
 # elif defined (HAVE__OPEN)
        return ::_open(templ,