Skip to contentSkip to conversation

linux/time.h name space pollution in 2.4.0-test11-pre6/pre7

PATCH New Werner Almesberger 1 participant 1 message Nov 18, 2000 Timekeeping, clocksource core, NTP, alarmtimer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux/time.h name space pollution in 2.4.0-test11-pre6/pre7

Hi Linus,

include/linux/time.h leaks out mktime, creating a possible conflict with POSIX mktime. This patch puts mktime and a few helper functions into #ifdef __KERNEL__

Originally for 2.4.0-test11-pre6, but applies also to 2.4.0-test11-pre7

Cheers, Werner

---------------------------------- cut here -----------------------------------

include/linux/time.h +4 -0
@@ -12,6 +12,8 @@
 };
 #endif /* _STRUCT_TIMESPEC */
 
+#ifdef __KERNEL__
+
 /*
  * Change timeval to jiffies, trying to avoid the
  * most obvious overflows..
@@ -79,6 +81,8 @@
 	  )*60 + min /* now have minutes */
 	)*60 + sec; /* finally seconds */
 }
+
+#endif /* __KERNEL__ */
 
 
 struct timeval {
Signature · 7 lines
  _________________________________________________________________________
 / Werner Almesberger, ICA, EPFL, CH           [email protected] /
/_IN_N_032__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/