Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Feb 2010 12:00:42 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r203862 - head/sys/sys
Message-ID:  <201002141200.o1EC0gf8063608@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed
Date: Sun Feb 14 12:00:42 2010
New Revision: 203862
URL: http://svn.freebsd.org/changeset/base/203862

Log:
  Make <sys/timeb.h> work without including <sys/types.h>.
  
  According to the last POSIX specification that contained <sys/timeb.h>,
  this header should also typedef time_t properly. Also add a proper
  comment to the final #endif.

Modified:
  head/sys/sys/timeb.h

Modified: head/sys/sys/timeb.h
==============================================================================
--- head/sys/sys/timeb.h	Sun Feb 14 12:00:23 2010	(r203861)
+++ head/sys/sys/timeb.h	Sun Feb 14 12:00:42 2010	(r203862)
@@ -38,6 +38,13 @@
 #ifndef _SYS_TIMEB_H_
 #define _SYS_TIMEB_H_
 
+#include <sys/_types.h>
+
+#ifndef _TIME_T_DECLARED
+typedef	__time_t	time_t;
+#define	_TIME_T_DECLARED
+#endif
+
 /* The ftime(2) system call structure -- deprecated. */
 struct timeb {
 	time_t	time;			/* seconds since the Epoch */
@@ -54,4 +61,4 @@ int ftime(struct timeb *);
 __END_DECLS
 #endif /* _KERNEL */
 
-#endif
+#endif /* !_SYS_TIMEB_H_ */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002141200.o1EC0gf8063608>