[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/cman/qdisk disk_util.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	lhh sourceware org	2007-01-26 14:34:26

Modified files:
	cman/qdisk     : disk_util.c 

Log message:
	Patch from Fabio Massimo Di Nitto - Fix portability of getuptime function

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/disk_util.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.2&r2=1.1.2.3

--- cluster/cman/qdisk/disk_util.c	2007/01/23 17:57:07	1.1.2.2
+++ cluster/cman/qdisk/disk_util.c	2007/01/26 14:34:26	1.1.2.3
@@ -71,8 +71,13 @@
 	if (!fp)
 		return -1;
 
+#if defined(__sparc__) || defined(__hppa__) || defined(__sparc64__) || defined (__hppa64__)
+	rv = fscanf(fp,"%ld.%d %ld.%d\n", &tv->tv_sec, &tv->tv_usec,
+		    &junk.tv_sec, &junk.tv_usec);
+#else
 	rv = fscanf(fp,"%ld.%ld %ld.%ld\n", &tv->tv_sec, &tv->tv_usec,
 		    &junk.tv_sec, &junk.tv_usec);
+#endif
 	fclose(fp);
 	
 	if (rv != 4) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]