Package list libsdl2-mixer / fc46e63
Applied upstream: http://hg.libsdl.org/SDL_mixer/rev/23d69b6621d0 Manuel A. Fernandez Montecelo 8 years ago
2 changed file(s) with 0 addition(s) and 69 deletion(s). Raw diff Collapse all Expand all
+0
-65
debian/patches/02_hurd.patch less more
0 Description: Fix FTBFS on Hurd
1 Introduced in 1.2.6-3 (Tue, 31 Jul 2007 14:16:36 +0200).
2 Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
3 Last-Update: 2012-01-20
4 Bug-Debian: http://bugs.debian.org/428892
5 --- a/music_cmd.c
6 +++ b/music_cmd.c
7 @@ -53,10 +53,8 @@
8 Mix_SetError("Out of memory");
9 return(NULL);
10 }
11 - strncpy(music->file, file, (sizeof music->file)-1);
12 - music->file[(sizeof music->file)-1] = '\0';
13 - strncpy(music->cmd, cmd, (sizeof music->cmd)-1);
14 - music->cmd[(sizeof music->cmd)-1] = '\0';
15 + music->file = strdup(file);
16 + music->cmd = strdup(cmd);
17 music->pid = 0;
18
19 /* We're done */
20 @@ -155,7 +153,7 @@
21
22 /* Child process - executes here */
23 case 0: {
24 - char command[PATH_MAX];
25 + char *command;
26 char **argv;
27
28 /* Unblock signals in case we're called from a thread */
29 @@ -166,11 +164,12 @@
30 }
31
32 /* Execute the command */
33 - strcpy(command, music->cmd);
34 + command = strdup(music->cmd);
35 argv = parse_args(command, music->file);
36 if ( argv != NULL ) {
37 execvp(argv[0], argv);
38 }
39 + SDL_free(command);
40
41 /* exec() failed */
42 perror(argv[0]);
43 @@ -219,6 +218,8 @@
44 /* Close the given music stream */
45 void MusicCMD_FreeSong(MusicCMD *music)
46 {
47 + SDL_free(music->file);
48 + SDL_free(music->cmd);
49 SDL_free(music);
50 }
51
52 --- a/music_cmd.h
53 +++ b/music_cmd.h
54 @@ -30,8 +30,8 @@
55 # include <linux/limits.h>
56 #endif
57 typedef struct {
58 - char file[PATH_MAX];
59 - char cmd[PATH_MAX];
60 + char *file;
61 + char *cmd;
62 pid_t pid;
63 } MusicCMD;
64
0 # review for libsdl2-mixer (SDL2), some must have been incorporated upstream or
1 # were backports in the first place
2 #
3 # 02_hurd.patch