aboutsummaryrefslogtreecommitdiffstats
path: root/x11
diff options
context:
space:
mode:
authorpat <pat@FreeBSD.org>2004-12-21 01:57:37 +0800
committerpat <pat@FreeBSD.org>2004-12-21 01:57:37 +0800
commit0a91c7488b74305255ded89ff02b2ab04100afec (patch)
tree123e8e67cea2b21443e399b8093226556bccab94 /x11
parentb4212f9670b9e0edcfe924f8b532fcc040582cfc (diff)
downloadfreebsd-ports-gnome-0a91c7488b74305255ded89ff02b2ab04100afec.tar.gz
freebsd-ports-gnome-0a91c7488b74305255ded89ff02b2ab04100afec.tar.zst
freebsd-ports-gnome-0a91c7488b74305255ded89ff02b2ab04100afec.zip
Fix loading history on sparc64
PR: ports/66074 Submitted by: Andrew Belashov <bel@orel.ru>
Diffstat (limited to 'x11')
-rw-r--r--x11/wmcliphist/files/patch-history.c31
1 files changed, 29 insertions, 2 deletions
diff --git a/x11/wmcliphist/files/patch-history.c b/x11/wmcliphist/files/patch-history.c
index 850e58e423d9..876a5a5668a9 100644
--- a/x11/wmcliphist/files/patch-history.c
+++ b/x11/wmcliphist/files/patch-history.c
@@ -1,8 +1,35 @@
---- history.c.orig Thu Jun 5 19:11:21 2003
-+++ history.c Thu Jun 5 19:11:17 2003
+--- history.c.orig Sun Aug 24 16:59:37 2003
++++ history.c Mon Dec 20 12:33:42 2004
@@ -1,3 +1,5 @@
+#include <sys/types.h>
+#include <sys/stat.h>
#include <wmcliphist.h>
+@@ -182,7 +184,7 @@
+ history_load()
+ {
+ gchar *buf;
+- gint len;
++ size_t len;
+ gint ver;
+ FILE *f;
+ gchar *fname;
+@@ -214,7 +216,7 @@
+
+ while (!feof(f)) {
+
+- if (fread(&len, sizeof(gint), 1, f) != 1)
++ if (fread(&len, sizeof(size_t), 1, f) != 1)
+ break;
+
+ if (num_items == num_items_to_keep) {
+@@ -299,7 +301,7 @@
+ list_node = g_list_last(history_items);
+ while (list_node) {
+ hist_item = (HISTORY_ITEM *)list_node->data;
+- if (fwrite(&hist_item->content_len, sizeof(gint), 1, f) != 1) {
++ if (fwrite(&hist_item->content_len, sizeof(size_t), 1, f) != 1) {
+ tmp_errno = E_WRITE;
+ break;
+ }