diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-06-28 22:14:35 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-06-28 22:14:35 +0000 |
commit | 45fcb767c3d32d764053c8694825e3ac2da02e1c (patch) | |
tree | 238e6a6472ec35f18aaf54e5bae0a88af0da9e5d /cpukit/libcsupport/src/__gettod.c | |
parent | 2010-06-28 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-45fcb767c3d32d764053c8694825e3ac2da02e1c.tar.bz2 |
2010-06-28 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/__brk.c, libcsupport/src/__gettod.c,
libcsupport/src/__times.c, libcsupport/src/fchdir.c,
libcsupport/src/ftrylockfile.c, libcsupport/src/getpwent.c,
libcsupport/src/gxx_wrappers.c, libcsupport/src/libio_sockets.c,
libcsupport/src/pipe.c: Use rtems_set_errno_and_return_minus_one()
where it was missed before.
Diffstat (limited to 'cpukit/libcsupport/src/__gettod.c')
-rw-r--r-- | cpukit/libcsupport/src/__gettod.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/cpukit/libcsupport/src/__gettod.c b/cpukit/libcsupport/src/__gettod.c index fdf6014799..05db4ab9d0 100644 --- a/cpukit/libcsupport/src/__gettod.c +++ b/cpukit/libcsupport/src/__gettod.c @@ -21,6 +21,7 @@ #include <sys/time.h> #include <errno.h> #include <rtems.h> +#include <rtems/seterr.h> #if defined(RTEMS_NEWLIB) && !defined(HAVE_GETTIMEOFDAY) /* @@ -32,16 +33,13 @@ int gettimeofday( ) { /* struct timezone* tzp = (struct timezone*) __tz; */ - if ( !tp ) { - errno = EFAULT; - return -1; - } + if ( !tp ) + rtems_set_errno_and_return_minus_one( EFAULT ); /* * POSIX does not seem to allow for not having a TOD so we just * grab the time of day. */ - _TOD_Get_timeval( tp ); /* |