diff options
author | ume <ume@FreeBSD.org> | 2005-07-05 15:20:23 +0800 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2005-07-05 15:20:23 +0800 |
commit | 34821805262cf82aff23f84860d2c7634c51fe52 (patch) | |
tree | 01a88d2d997daa842e22bfe3c8c8d63a77eef523 /sysutils/gkfreq | |
parent | 1da42631c9feb4e6cf1f8be7971fd0fa7dd48d84 (diff) | |
download | freebsd-ports-gnome-34821805262cf82aff23f84860d2c7634c51fe52.tar.gz freebsd-ports-gnome-34821805262cf82aff23f84860d2c7634c51fe52.tar.zst freebsd-ports-gnome-34821805262cf82aff23f84860d2c7634c51fe52.zip |
fix build on sparc64.
Reported by: pointyhat via kris
Diffstat (limited to 'sysutils/gkfreq')
-rw-r--r-- | sysutils/gkfreq/files/patch-gkfreq.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/sysutils/gkfreq/files/patch-gkfreq.c b/sysutils/gkfreq/files/patch-gkfreq.c index c00061dcf665..4a926ea3191c 100644 --- a/sysutils/gkfreq/files/patch-gkfreq.c +++ b/sysutils/gkfreq/files/patch-gkfreq.c @@ -1,7 +1,7 @@ Index: gkfreq.c diff -u -p gkfreq.c.orig gkfreq.c --- gkfreq.c.orig Wed Jun 8 01:42:00 2005 -+++ gkfreq.c Fri Jun 17 01:06:15 2005 ++++ gkfreq.c Tue Jul 5 16:12:29 2005 @@ -9,6 +9,9 @@ #include <sys/time.h> #include <string.h> @@ -12,7 +12,7 @@ diff -u -p gkfreq.c.orig gkfreq.c #define CONFIG_NAME "gkfreq" #define STYLE_NAME "gkfreq" -@@ -17,6 +20,10 @@ static GkrellmMonitor *monitor; +@@ -17,20 +20,36 @@ static GkrellmMonitor *monitor; static GkrellmPanel *panel; static GkrellmDecal *decal_text1; static gint style_id; @@ -22,8 +22,17 @@ diff -u -p gkfreq.c.orig gkfreq.c +#endif ++#if 0 __inline__ unsigned long long int rdtsc() -@@ -31,6 +38,16 @@ __inline__ unsigned long long int rdtsc( + { + unsigned long long int x; + __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x)); + return x; + } ++#endif + + /* FIXED : whatdoineed2do@yahoo.co.uk + */ static void read_MHz(char* buffer_, size_t bufsz_) { @@ -40,7 +49,7 @@ diff -u -p gkfreq.c.orig gkfreq.c FILE *f; if ( (f = fopen("/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq", "r")) == NULL) { /* this can happen if the the scaling is built as a module but it aint -@@ -44,6 +61,7 @@ void read_MHz(char* buffer_, size_t bufs +@@ -44,6 +63,7 @@ void read_MHz(char* buffer_, size_t bufs snprintf(buffer_, bufsz_, "%d MHz", i/1000 ); fclose(f); } @@ -48,7 +57,7 @@ diff -u -p gkfreq.c.orig gkfreq.c } static gint -@@ -106,6 +124,12 @@ create_plugin(GtkWidget *vbox, gint firs +@@ -106,6 +126,12 @@ create_plugin(GtkWidget *vbox, gint firs if (first_create) g_signal_connect(G_OBJECT (panel->drawing_area), "expose_event", G_CALLBACK (panel_expose_event), NULL); |