mirror of
https://github.com/coreutils/coreutils.git
synced 2025-01-21 15:43:30 +08:00
(settime): Fix { typo in previous patch. Also, don't
boether returning ENOSYS; just let stime return whatever errno it wants to return.
This commit is contained in:
parent
abeaf74fcb
commit
8c871e2391
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user