]> git.sur5r.net Git - cc65/commitdiff
sim65: S_IREAD and S_IWRITE are nonstandard.
authorPatrick Pelletier <code@funwithsoftware.org>
Fri, 17 Aug 2018 18:20:34 +0000 (11:20 -0700)
committerOliver Schmidt <ol.sc@web.de>
Fri, 17 Aug 2018 21:28:45 +0000 (23:28 +0200)
The Linux build was failing with:

sim65/paravirt.c: In function ‘PVOpen’:
sim65/paravirt.c:217:18: error: ‘S_IREAD’ undeclared (first use in this function)
         OMode |= S_IREAD;
                  ^
sim65/paravirt.c:217:18: note: each undeclared identifier is reported only once for each function it appears in
sim65/paravirt.c:220:18: error: ‘S_IWRITE’ undeclared (first use in this function)
         OMode |= S_IWRITE;
                  ^
make[1]: *** [../wrk/sim65/paravirt.o] Error 1

src/sim65/paravirt.c

index fda2839afd672cf56dde70f6b2d81f04a516a4bb..1c431fdc96a34e2e7124bbe8c79d76971dea5bce 100644 (file)
 /* Anyone else */
 #  include <unistd.h>
 #endif
+#ifndef S_IREAD
+#  define S_IREAD  S_IRUSR
+#endif
+#ifndef S_IWRITE
+#  define S_IWRITE S_IWUSR
+#endif
 
 /* common */
 #include "cmdline.h"