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
e2fdc82284
commit
147fa0fa28
@ -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