1 $NetBSD: patch-ab,v 1.1 2009/03/13 14:34:21 martin Exp $
3 # Fix obvious C bugs and calm a warning. Without this, the app shows
4 # bogus "last played" times and dies imediately with a bus error on
5 # alignement critical bugs.
7 --- mserv.c.orig 2001-01-28 20:11:21.000000000 +0100
8 +++ mserv.c 2009-03-13 15:11:04.000000000 +0100
9 @@ -43,7 +43,7 @@ void mserv_connect(void)
13 - if (connect(Session.socket, &sin, sizeof(sin)) == -1)
14 + if (connect(Session.socket, (struct sockaddr *)&sin, sizeof(sin)) == -1)
16 strcat(buf, strerror(errno));
17 printf("Can't make Connection: (%d): %s\n", errno, buf);
18 @@ -226,7 +226,8 @@ void mserv_key_next_song(char *data)
20 void mserv_key_update_status(char *data)
26 if (!Session.StatusWin.window)
28 @@ -253,8 +254,9 @@ void mserv_key_update_status(char *data)
29 gtk_entry_set_text(GTK_ENTRY(Session.StatusWin.Song), token);
31 token = strtok(NULL, "\t");
32 + t = strtoull(token, &endp, 10);
33 gtk_entry_set_text(GTK_ENTRY(Session.StatusWin.Last_Played),
34 - ctime((const time_t *)token));
36 token = strtok(NULL, "\t");
37 gtk_entry_set_text(GTK_ENTRY(Session.StatusWin.Length), token);