summaryrefslogtreecommitdiff
path: root/src/helper/time_support.h
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-04-09 05:55:23 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-04-09 05:55:23 +0000
commit2585fc34200938fb3fa55a450ea37f68012aafa7 (patch)
tree1b43cf1f32e7ac5f52596fe7660923a7f63b8927 /src/helper/time_support.h
parenta0647227439434c4a71470e336ec8715d43d0501 (diff)
downloadopenocd+libswd-2585fc34200938fb3fa55a450ea37f68012aafa7.tar.gz
openocd+libswd-2585fc34200938fb3fa55a450ea37f68012aafa7.tar.bz2
openocd+libswd-2585fc34200938fb3fa55a450ea37f68012aafa7.tar.xz
openocd+libswd-2585fc34200938fb3fa55a450ea37f68012aafa7.zip
Don Porges fixed c99 issues.
git-svn-id: svn://svn.berlios.de/openocd/trunk@553 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/helper/time_support.h')
-rw-r--r--src/helper/time_support.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/helper/time_support.h b/src/helper/time_support.h
index 05dc9119..311c88d3 100644
--- a/src/helper/time_support.h
+++ b/src/helper/time_support.h
@@ -20,8 +20,16 @@
#ifndef TIME_SUPPORT_H
#define TIME_SUPPORT_H
-#include <sys/time.h>
-#include <time.h>
+#ifdef TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
extern int timeval_subtract(struct timeval *result, struct timeval *x, struct timeval *y);
extern int timeval_add(struct timeval *result, struct timeval *x, struct timeval *y);