diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2005-09-29 17:19:30 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2005-09-29 17:19:30 +0000 |
commit | 8c871e2391f079507979b99c67c7514a595e219c (patch) | |
tree | 0de808a06698df0b0a8d0fdee9772f410e02e5b8 | |
parent | abeaf74fcb2073400debc5eb49add5ac977404e0 (diff) | |
download | coreutils-8c871e2391f079507979b99c67c7514a595e219c.tar.xz |
(settime): Fix { typo in previous patch. Also, don't
boether returning ENOSYS; just let stime return whatever errno it
wants to return.
-rw-r--r-- | lib/settime.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/settime.c b/lib/settime.c index 6fbee50f5..8a775ee9a 100644 --- a/lib/settime.c +++ b/lib/settime.c @@ -62,15 +62,12 @@ settime (struct timespec const *ts) return r; } #elif HAVE_STIME - { - /* This fails to compile on OSF1 V5.1, due to stime requiring - a `long int*' and tv_sec is `int'. But that system does provide - settimeofday. */ - int r = stime (&ts->tv_sec); - if (r == 0 || errno == EPERM) - return r; -#endif - + /* This fails to compile on OSF1 V5.1, due to stime requiring + a `long int*' and tv_sec is `int'. But that system does provide + settimeofday. */ + return stime (&ts->tv_sec); +#else errno = ENOSYS; return -1; +#endif } |