Here's the work-around I'm using:
2005-09-29 Jim Meyering <[EMAIL PROTECTED]>
* settime.c (settime): Move the HAVE_STIME block `up' into an #elif
block, so that we don't even try to compile it if settimeofday is
available. This works around a compilation failure on OSF1 V5.1,
due to stime requiring a `long int*' while tv_sec is `int'.
Index: lib/settime.c
===================================================================
RCS file: /fetish/cu/lib/settime.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -u -r1.6 -r1.7
--- lib/settime.c 22 Sep 2005 06:05:39 -0000 1.6
+++ lib/settime.c 29 Sep 2005 13:13:49 -0000 1.7
@@ -61,12 +61,16 @@ settime (struct timespec const *ts)
if (r == 0 || errno == EPERM)
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
-#if HAVE_STIME
- return stime (&ts->tv_sec);
-#else
errno = ENOSYS;
return -1;
-#endif
}
_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils