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:
parent
e408eccfc7
commit
621d611a9d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user