pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio/gtkmserv Make it work on alignement critical archs



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b896bd1783b0
branches:  trunk
changeset: 555935:b896bd1783b0
user:      martin <martin%pkgsrc.org@localhost>
date:      Fri Mar 13 14:34:21 2009 +0000

description:
Make it work on alignement critical archs

diffstat:

 audio/gtkmserv/distinfo         |   3 ++-
 audio/gtkmserv/patches/patch-ab |  38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+), 1 deletions(-)

diffs (54 lines):

diff -r 42cb5193ec36 -r b896bd1783b0 audio/gtkmserv/distinfo
--- a/audio/gtkmserv/distinfo   Fri Mar 13 13:33:34 2009 +0000
+++ b/audio/gtkmserv/distinfo   Fri Mar 13 14:34:21 2009 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.6 2005/02/23 20:39:46 agc Exp $
+$NetBSD: distinfo,v 1.7 2009/03/13 14:34:21 martin Exp $
 
 SHA1 (gtkmserv-0.5.2.tar.gz) = 59829ef0c2a438b6f35577effbeaff5ed91ccd0d
 RMD160 (gtkmserv-0.5.2.tar.gz) = 073cabc485d4abca55d545c230b9023d021d95cc
 Size (gtkmserv-0.5.2.tar.gz) = 22441 bytes
 SHA1 (patch-aa) = b9b0b62d0444c5e793ea0f331444b25417e1a882
+SHA1 (patch-ab) = 007e57d9053a74a411f1ee8f806259f5ef9310ab
diff -r 42cb5193ec36 -r b896bd1783b0 audio/gtkmserv/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/gtkmserv/patches/patch-ab   Fri Mar 13 14:34:21 2009 +0000
@@ -0,0 +1,38 @@
+$NetBSD: patch-ab,v 1.1 2009/03/13 14:34:21 martin Exp $
+
+# Fix obvious C bugs and calm a warning. Without this, the app shows
+# bogus "last played" times and dies imediately with a bus error on
+# alignement critical bugs.
+
+--- mserv.c.orig       2001-01-28 20:11:21.000000000 +0100
++++ mserv.c    2009-03-13 15:11:04.000000000 +0100
+@@ -43,7 +43,7 @@ void mserv_connect(void)
+       return;
+    }
+ 
+-   if (connect(Session.socket, &sin, sizeof(sin)) == -1)
++   if (connect(Session.socket, (struct sockaddr *)&sin, sizeof(sin)) == -1)
+    {
+       strcat(buf, strerror(errno));
+       printf("Can't make Connection: (%d): %s\n", errno, buf);
+@@ -226,7 +226,8 @@ void mserv_key_next_song(char *data)
+ 
+ void mserv_key_update_status(char *data)
+ {
+-   char *token;
++   char *token, *endp;
++   time_t t;
+ 
+    if (!Session.StatusWin.window)
+       return;
+@@ -253,8 +254,9 @@ void mserv_key_update_status(char *data)
+    gtk_entry_set_text(GTK_ENTRY(Session.StatusWin.Song), token);
+ 
+    token = strtok(NULL, "\t");
++   t = strtoull(token, &endp, 10);
+    gtk_entry_set_text(GTK_ENTRY(Session.StatusWin.Last_Played),
+-                    ctime((const time_t *)token));
++                    ctime(&t));
+    token = strtok(NULL, "\t");
+    gtk_entry_set_text(GTK_ENTRY(Session.StatusWin.Length), token);
+ 



Home | Main Index | Thread Index | Old Index