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

Message ID 20001118190107.D23033@almesberger.net
State New, archived
Headers show
Series
  • linux/time.h name space pollution in 2.4.0-test11-pre6/pre7
Related show

Commit Message

Werner Almesberger Nov. 18, 2000, 6:01 p.m. UTC
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 -----------------------------------

Patch

--- linux.orig/include/linux/time.h	Mon Oct  2 20:01:17 2000
+++ linux/include/linux/time.h	Sat Nov 18 18:45:15 2000
@@ -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 {