This patch file is for FreeBSD and shairport-0.05 Changes: - use base system of OpenSSL library - compile on FreeBSD system(I tested with FreeBSD-9-current) - increase buffer site to 5 sec from 0.5sec - disable IPv6(because My home network is disabled IPv6) require: some CPAN modules are needed. Please install below modules manually from ports. - p5-HTTP-Message(www/p5-HTTP-Message) - p5-Crypt-OpenSSL-RSA(security/p5-Crypt-OpenSSL-RSA) - p5-IO-Socket-INET6(net/p5-IO-Socket-INET6) - avahi-app-0.6.29(net/avahi-app) original shairport site: http://mafipulation.org/ diff -u shairport-0.05.old/Makefile shairport-0.05/Makefile --- shairport-0.05.old/Makefile 2011-04-13 13:39:59.000000000 +0900 +++ shairport-0.05/Makefile 2011-04-29 14:58:35.000000000 +0900 @@ -1,4 +1,5 @@ -CFLAGS = `pkg-config --cflags --libs ao openssl` +#CFLAGS = `pkg-config --cflags --libs ao openssl` +CFLAGS = `pkg-config --cflags --libs ao ` hairtunes: hairtunes.c alac.c - gcc hairtunes.c alac.c -lm $(CFLAGS) -o hairtunes + gcc hairtunes.c alac.c -lm $(CFLAGS) -lssl -o hairtunes diff -u shairport-0.05.old/hairtunes.c shairport-0.05/hairtunes.c --- shairport-0.05.old/hairtunes.c 2011-04-15 21:24:04.000000000 +0900 +++ shairport-0.05/hairtunes.c 2011-04-29 15:03:24.000000000 +0900 @@ -23,7 +23,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ - +#include #include #include #include @@ -46,9 +46,16 @@ #include "alac.h" // default buffer - about half a second +#if 0 #define BUFFER_FRAMES 64 #define START_FILL 55 #define MAX_PACKET 2048 +#else +#define BUFFER_FRAMES 640 +#define START_FILL 550 +#define MAX_PACKET 20480 +#endif + typedef unsigned short seq_t; @@ -318,6 +325,7 @@ } static int rtp_sockets[2]; // data, control +#undef AF_INET6 #ifdef AF_INET6 struct sockaddr_in6 rtp_client; #else @@ -415,8 +423,11 @@ #else si.sin_family = AF_INET; si.sin_len = sizeof(si); +#if 0 si.sin_addr.s_addr = htonl(INADDR_ANY); #endif + si.sin_addr.s_addr = htonl(0); +#endif unsigned short port = 6000 - 3; do { Only in shairport-0.05: hairtunes.c.org diff -u shairport-0.05.old/shairport.pl shairport-0.05/shairport.pl --- shairport-0.05.old/shairport.pl 2011-04-14 19:18:48.000000000 +0900 +++ shairport-0.05/shairport.pl 2011-04-29 14:27:05.000000000 +0900 @@ -83,7 +83,7 @@ $avahi_publish = fork(); if ($avahi_publish==0) { - exec 'avahi-publish-service', + exec '/usr/local/bin/avahi-publish-service', join('', map { sprintf "%02X", $_ } @hw_addr) . "\@$apname", "_raop._tcp", "5000", @@ -95,6 +95,7 @@ my $listen; { +if (0) { eval { local $SIG{__DIE__}; $listen = new IO::Socket::INET6(Listen => 1, @@ -109,6 +110,7 @@ "* Install this if iTunes won't play. *\n", "**************************************\n\n"; } +} $listen ||= new IO::Socket::INET(Listen => 1, LocalPort => 5000,