diff rogue4/mach_dep.c @ 284:6376b514a30b

Fix more header-related warnings. This fixes all current default warnings with GCC7 on Linux. That does not mean the code is anywhere close to clean.
author John "Elwin" Edwards
date Fri, 22 Sep 2017 16:24:40 -0400
parents d3968e9cb98d
children
line wrap: on
line diff
--- a/rogue4/mach_dep.c	Mon Sep 18 19:36:14 2017 -0400
+++ b/rogue4/mach_dep.c	Fri Sep 22 16:24:40 2017 -0400
@@ -38,6 +38,11 @@
 #include <fcntl.h>
 #include <string.h>
 #include <errno.h>
+
+#ifdef CHECKTIME
+#include <unistd.h>
+#endif
+
 #include "rogue.h"
 
 int num_checks;		/* times we've gone over in checkout() */
@@ -266,10 +271,10 @@
 
 #ifdef CHECKTIME
 	checktime = (CHECKTIME * 60) / num_checks;
-#endif
 #ifdef SIGALRM
 	alarm(checktime);
 #endif
+#endif
 
 	chmsg(msgs[num_checks - 1], ((double) checktime / 60.0));
     }