summaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1996-12-13 13:12:02 +0000
committerbde <bde@FreeBSD.org>1996-12-13 13:12:02 +0000
commita2378a9d0cfba9ea8ba4f4f5f58e8bb4c9013472 (patch)
tree7e649cd87cad877e587f17e4fc705d9ce406d413 /games
parent058682541ad2c4fa994749247cf441b15f5213d8 (diff)
downloadFreeBSD-src-a2378a9d0cfba9ea8ba4f4f5f58e8bb4c9013472.zip
FreeBSD-src-a2378a9d0cfba9ea8ba4f4f5f58e8bb4c9013472.tar.gz
Hack around misuse of reserved names `clock' and and `time' in a different
way. Defining KERNEL before including <sys/time.h> broke when "opt_cpu.h" was included in a deeply nested header, except in -current where the problem is masked by a namespace pollution bug in <stdio.h>.
Diffstat (limited to 'games')
-rw-r--r--games/battlestar/com6.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/games/battlestar/com6.c b/games/battlestar/com6.c
index 4f24cd3..a7fa41e 100644
--- a/games/battlestar/com6.c
+++ b/games/battlestar/com6.c
@@ -90,12 +90,14 @@ live()
}
/*
- * sigh -- this program thinks "time" is an int. It's easier to not load
- * <time.h> than try and fix it.
+ * sigh -- this program thinks `clock' and `time' are ints. It's easier
+ * to hack around this than to fix it properly.
*/
-#define KERNEL
+#define clock not_our_clock
+#define time not_our_time
#include <sys/time.h>
-#undef KERNEL
+#undef clock
+#undef time
post(ch)
char ch;
OpenPOWER on IntegriCloud