]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(settime): Fix { typo in previous patch. Also, don't
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 29 Sep 2005 17:19:30 +0000 (17:19 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 29 Sep 2005 17:19:30 +0000 (17:19 +0000)
boether returning ENOSYS; just let stime return whatever errno it
wants to return.

lib/settime.c

index 6fbee50f5424af477d3d1a15cca6291bf09a6964..8a775ee9a633c58e04c67cbbc63bd54d31032230 100644 (file)
@@ -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
 }