Patching forked-daapd So It Actually Works

I’ve been struggling with a pair of issues with forked-daapd recently. I’ve managed to fix one of them for the time being. In particular, with recent versions of iTunes forked-daapd was dropping out after about 5 minutes of audio. I found the issue in the bug tracker on github, and found that some people has taken some stabs at patching the problem. One of them actually succeeded (though no one appeared to be able to post a working .deb).

I used the guide How to: Recompiling / Rebuild Debian / Ubuntu Linux Binary Source File Packages and the patch listed in this comment to sort out the problem. On Debian Testing here are the steps to follow to recreate the solution:

apt-get install build-essential fakeroot dpkg-dev
cd /usr/src/
apt-get source forked-daapd
apt-get build-dep forked-daapd
dpkg-source -x forked-daapd_0.19gcd-2.dsc
cd forked-daapd-0.19gcd/src/
cp httpd_daap.c httpd_daap.c.bak
wget https://raw.github.com/kekiefer/forked-daapd/77dc0fd2f466a02b86582ed2c5f97ea6e444f2ac/src/httpd_daap.c
cd ..
dpkg-buildpackage -rfakeroot -b
cd /usr/src
dpkg -i forked-daapd_0.19gcd-2_amd64.deb

You’re just recompiling the regular debian package but with an updated httpd_daap.c source file. You can also just download the .deb here.