make work for 64 bits. fix pcm 64-bit problems - calls to realloc assumed sizeof(void*)==4; - chancreate was given the wrong argument. this works for the 32-bit compiler, since for 8c sizeof(ulong)==sizeof(void*). pcm didn't work because the cp was given cat's arguments. man page was edited to reflect this change Reference: /n/sources/patch/maybe/juke-fixes Date: Fri Dec 7 13:13:05 CET 2012 Signed-off-by: quanstro@quanstro.net --- /sys/src/games/music/playlistfs/player.c Fri Dec 7 13:12:52 2012 +++ /sys/src/games/music/playlistfs/player.c Fri Dec 7 13:12:51 2012 @@ -27,7 +27,7 @@ char *playprog[] = { [Pac] = "/bin/games/pac4dec", [Mp3] = "/bin/games/mp3dec", -[Pcm] = "/bin/cp", +[Pcm] = "/bin/cat", [Ogg] = "/bin/games/vorbisdec", }; @@ -402,6 +402,7 @@ playinit(void) { int i; + Pmsg pmsg; full = chancreate(sizeof(Pacbuf*), 1); empty = chancreate(sizeof(Pacbuf*), NPacbuf); @@ -412,7 +413,7 @@ for(i = 0; i < NSparebuf; i++) sendp(spare, malloc(sizeof(Pacbuf))); - playc = chancreate(sizeof(Pmsg), 1); + playc = chancreate(sizeof(pmsg.m), 1); procrfork(pacproc, nil, 32*1024, RFFDG); procrfork(pcmproc, nil, 32*1024, RFFDG); } --- /sys/src/games/music/jukefs/parse.c Fri Dec 7 13:12:55 2012 +++ /sys/src/games/music/jukefs/parse.c Fri Dec 7 13:12:53 2012 @@ -436,7 +436,7 @@ */ for(i = 0; i < parent->nchildren; i++) if(parent->children[i] == child) return; - parent->children = realloc(parent->children, (i+1)*4); + parent->children = realloc(parent->children, (i+1)*sizeof *parent->children); parent->children[i] = child; parent->nchildren++; if(parent->type == Category && child->type == Category) @@ -457,7 +457,7 @@ i = child->ncatparents; if(0) fprint(2, "addcatparent %s parent %d type %d child %d type %d\n",where, parent->tabno, parent->type, child->tabno, child->type); - child->catparents = realloc(child->catparents, (i+1)*4); + child->catparents = realloc(child->catparents, (i+1)*sizeof *child->catparents); child->catparents[i] = parent; child->ncatparents++; } @@ -476,7 +476,7 @@ // if(child->catparents[i] == parent) return; i = child->ncatparents; fprint(2, "addcatparent parent %d child %d\n", parent->tabno, child->tabno); - child->catparents = realloc(child->catparents, (i+1)*4); + child->catparents = realloc(child->catparents, (i+1)*sizeof *child->catparents); child->catparents[i] = parent; child->ncatparents++; } --- /sys/man/7/playlistfs Fri Dec 7 13:12:58 2012 +++ /sys/man/7/playlistfs Fri Dec 7 13:12:56 2012 @@ -131,7 +131,7 @@ /bin/games/pac4dec .TP \&.pcm -/bin/cp +/bin/cat .TP \&.ogg /bin/games/vorbisdec