From 3d87fa03e51f4041a8b15a4190fe537f4cd9ffa5 Mon Sep 17 00:00:00 2001 From: hazen2215 Date: Sun, 5 Nov 2023 21:50:06 +0900 Subject: [PATCH] foobillard++: fix segfault on musl fixes #43236 --- srcpkgs/foobillard++/patches/strsound.patch | 19 +++++++++++++++++++ srcpkgs/foobillard++/template | 3 +-- 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/foobillard++/patches/strsound.patch diff --git a/srcpkgs/foobillard++/patches/strsound.patch b/srcpkgs/foobillard++/patches/strsound.patch new file mode 100644 index 0000000000000..8740492a142fc --- /dev/null +++ b/srcpkgs/foobillard++/patches/strsound.patch @@ -0,0 +1,19 @@ +diff --git a/src/sound_stuff.c b/src/sound_stuff.c +index 32ffed7..7ed946e 100644 +--- a/src/sound_stuff.c ++++ b/src/sound_stuff.c +@@ -96,12 +96,12 @@ int strsound ( char s1[] ) + int i = 0; + char s[10]; + if(strlen(s1) > 4) { +- strcpy(s,&s[strlen(s)-4]); ++ strcpy(s,&s1[strlen(s1)-4]); + while (s[i]) { + s[i] = toupper(s[i]); + ++i; + } +- if(strcmp(s,".MP3") || strcmp(s,".OGG")) { ++ if(!strcmp(s,".MP3") || !strcmp(s,".OGG")) { + return(1); + } + } diff --git a/srcpkgs/foobillard++/template b/srcpkgs/foobillard++/template index 2071ad3fc3546..07d5ae2f943ce 100644 --- a/srcpkgs/foobillard++/template +++ b/srcpkgs/foobillard++/template @@ -1,8 +1,7 @@ # Template file for 'foobillard++' -# often segfaults at launch on musl, but not marking broken yet pkgname=foobillard++ version=3.42beta -revision=4 +revision=5 build_style=gnu-configure configure_args="--enable-standard" hostmakedepends="automake pkg-config"