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>.
This commit is contained in:
bde 1996-12-13 13:12:02 +00:00
parent e2fdc82284
commit 147fa0fa28

View File

@ -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;