[rtems commit] __gettod.c: Fix missing prototype warnings
Joel Sherrill
joel at rtems.org
Sun Sep 22 15:32:20 UTC 2013
Module: rtems
Branch: master
Commit: d334b60b04556cff0692d332336411f664153c6e
Changeset: http://git.rtems.org/rtems/commit/?id=d334b60b04556cff0692d332336411f664153c6e
Author: Joel Sherrill <joel.sherrill at oarcorp.com>
Date: Sun Sep 22 10:22:01 2013 -0500
__gettod.c: Fix missing prototype warnings
---
cpukit/libcsupport/src/__gettod.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/cpukit/libcsupport/src/__gettod.c b/cpukit/libcsupport/src/__gettod.c
index a07497d..fe913dc 100644
--- a/cpukit/libcsupport/src/__gettod.c
+++ b/cpukit/libcsupport/src/__gettod.c
@@ -19,7 +19,13 @@
#endif
#if defined(RTEMS_NEWLIB)
+/*
+ * Needed to get the prototype for the newlib helper method
+ */
+#define _COMPILING_NEWLIB
+
#include <sys/time.h>
+#include <reent.h>
#include <errno.h>
#include <rtems/score/todimpl.h>
#include <rtems/seterr.h>
@@ -66,9 +72,10 @@ int gettimeofday(
int _gettimeofday_r(
struct _reent *ignored_reentrancy_stuff __attribute__((unused)),
struct timeval *tp,
- struct timezone *tzp
+ void *__tz
)
{
+ struct timezone *tzp = __tz;
return gettimeofday( tp, tzp );
}
#endif
@@ -79,10 +86,12 @@ int _gettimeofday_r(
* "System call" version
*/
int _gettimeofday(
- struct timeval *tp,
- struct timezone *tzp
+ struct timeval *tp,
+ void *__tz
)
{
+ struct timezone *tzp = __tz;
+
return gettimeofday( tp, tzp );
}
#endif
More information about the vc
mailing list