From 45fcb767c3d32d764053c8694825e3ac2da02e1c Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 28 Jun 2010 22:14:35 +0000 Subject: 2010-06-28 Joel Sherrill * 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. --- cpukit/libcsupport/src/__gettod.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'cpukit/libcsupport/src/__gettod.c') 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 #include #include +#include #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 ); /* -- cgit v1.2.3