]> granicus.if.org Git - sudo/commitdiff
Move declatation of struct timespec to its own include files for
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 23 Jun 2005 03:04:35 +0000 (03:04 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 23 Jun 2005 03:04:35 +0000 (03:04 +0000)
systems without it since it needs time_t defined.

check.c
compat.h

diff --git a/check.c b/check.c
index 04d60cd539d1593182514cd85e6ee52462be9324..3fb306181d89912fe716df1f3cb227d4200c2e6c 100644 (file)
--- a/check.c
+++ b/check.c
@@ -51,6 +51,9 @@
 #include <time.h>
 #include <pwd.h>
 #include <grp.h>
+#ifndef HAVE_TIMESPEC
+# include <emul/timespec.h>
+#endif
 
 #include "sudo.h"
 
index e430e274e126ba4237313104a3170e8be555a6c5..d7a45cbd3cb377cdda4fd97d4b070b0da6fbe2cd 100644 (file)
--- a/compat.h
+++ b/compat.h
@@ -255,13 +255,6 @@ const char *getprogname __P((void));
 #endif /* HAVE___PROGNAME */
 #endif /* !HAVE_GETPROGNAME */
 
-#ifndef HAVE_TIMESPEC
-struct timespec {
-    time_t     tv_sec;
-    long       tv_nsec;
-};
-#endif /* !HAVE_TIMESPEC */
-
 #ifndef timespecclear
 # define timespecclear(ts)     (ts)->tv_sec = (ts)->tv_nsec = 0
 #endif