1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-04 09:09:56 +00:00

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:
Bruce Evans 1996-12-13 13:12:02 +00:00
parent e408eccfc7
commit 621d611a9d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=20397

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;