From: Paul Eggert Date: Thu, 29 Sep 2005 17:19:30 +0000 (+0000) Subject: (settime): Fix { typo in previous patch. Also, don't X-Git-Tag: v5.90~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8c871e2391f079507979b99c67c7514a595e219c;p=thirdparty%2Fcoreutils.git (settime): Fix { typo in previous patch. Also, don't boether returning ENOSYS; just let stime return whatever errno it wants to return. --- diff --git a/lib/settime.c b/lib/settime.c index 6fbee50f54..8a775ee9a6 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 }