freebsd-ports/misc/gkx86info2/files/patch-MHz.c
Mario Sergio Fujikawa Ferreira f0873a48a1 New port gkx86info version 0.0.2: GKrellM plugin that simply prints
the current clock speed
2002-08-08 02:10:57 +00:00

19 lines
477 B
C

--- MHz.c.orig Sat Oct 6 05:41:06 2001
+++ MHz.c Wed Aug 7 23:01:05 2002
@@ -11,6 +11,7 @@
*/
#include <stdio.h>
+#include <stdlib.h>
#include <sys/time.h>
#include <string.h>
#include <unistd.h>
@@ -45,7 +46,7 @@
microseconds = ((tvstop.tv_sec-tvstart.tv_sec)*1000000) +
(tvstop.tv_usec-tvstart.tv_usec);
- buffer = malloc(sizeof(char)*512);
+ buffer = (char *) malloc(sizeof(char)*512);
sprintf(buffer, "%lldMHz",
(cycles[1]-cycles[0])/microseconds);