--- pngcrush-1.5.10/pngcrush.c
+++ pngcrush/pngcrush.c
@@ -474,7 +474,9 @@
     !defined(__riscos)
 #  include <unistd.h>
 #endif
-#ifndef __riscos
+#ifdef __riscos
+#  include <swis.h>
+#else
 #  include <sys/types.h>
 #  include <sys/stat.h>
 #endif
@@ -559,6 +561,12 @@
 #  define TIME_T float
 #endif
 
+#ifndef HANDLE_CHUNK_ALWAYS
+#  define HANDLE_CHUNK_ALWAYS   PNG_HANDLE_CHUNK_ALWAYS
+#  define HANDLE_CHUNK_IF_SAFE  PNG_HANDLE_CHUNK_IF_SAFE
+#  define HANDLE_CHUNK_NEVER    PNG_HANDLE_CHUNK_NEVER
+#endif
+
 /* input and output filenames */
 static PNG_CONST char *progname = "pngtest" DOT "exe";
 static PNG_CONST char *inname = "pngtest" DOT "png";
