commit the iTunes 5 fixes

This commit is contained in:
Ron Pedde 2005-09-23 05:26:52 +00:00
parent 1c83ac43a1
commit ff84e06334
3 changed files with 25 additions and 3 deletions

2
README
View File

@ -17,7 +17,7 @@ You'll still need distro-specific startup scripts. Check
the contrib directory to see if there are rc scripts for your the contrib directory to see if there are rc scripts for your
distro. distro.
Questions? Check the forums at mt-daapd.sourceforge.net or mail Questions? Check the forums at www.mt-daapd.org or mail
rpedde@users.sourceforge.net rpedde@users.sourceforge.net

View File

@ -90,6 +90,8 @@ case $host in
CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__ -DHAVE_BROKEN_RECVIF_NAME" CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__ -DHAVE_BROKEN_RECVIF_NAME"
CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS" CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
LDFLAGS="$LDFLAGS -lnsl -lsocket";; LDFLAGS="$LDFLAGS -lnsl -lsocket";;
*freebsd*)
CPPFLAGS="$CPPFLAGS -DFREEBSD";;
*linux*) *linux*)
CPPFLAGS="$CPPFLAGS -DNOT_HAVE_SA_LEN";; CPPFLAGS="$CPPFLAGS -DNOT_HAVE_SA_LEN";;
*openbsd*) *openbsd*)

View File

@ -23,6 +23,9 @@
Change History (most recent first): Change History (most recent first):
$Log$ $Log$
Revision 1.5 2005/09/23 05:26:52 rpedde
commit the iTunes 5 fixes
Revision 1.4 2005/03/05 06:37:37 rpedde Revision 1.4 2005/03/05 06:37:37 rpedde
Roll back patch - breaks fbsd Roll back patch - breaks fbsd
@ -82,6 +85,8 @@ First checkin
#include <unistd.h> #include <unistd.h>
#include <stdio.h> #include <stdio.h>
#include "err.h"
/* Solaris defined SIOCGIFCONF etc in <sys/sockio.h> but /* Solaris defined SIOCGIFCONF etc in <sys/sockio.h> but
other platforms don't even have that include file. So, other platforms don't even have that include file. So,
if we haven't yet got a definition, let's try to find if we haven't yet got a definition, let's try to find
@ -115,6 +120,8 @@ struct ifi_info *get_ifi_info(int family, int doaliases)
struct sockaddr_in6 *sinptr6; struct sockaddr_in6 *sinptr6;
#endif #endif
DPRINTF(E_DBG,L_REND,"get_ifi_info\n");
sockfd = -1; sockfd = -1;
buf = NULL; buf = NULL;
ifihead = NULL; ifihead = NULL;
@ -155,9 +162,22 @@ struct ifi_info *get_ifi_info(int family, int doaliases)
ifr = (struct ifreq *) ptr; ifr = (struct ifreq *) ptr;
len = GET_SA_LEN(ifr->ifr_addr); len = GET_SA_LEN(ifr->ifr_addr);
ptr += sizeof(ifr->ifr_name) + len; /* for next one in buffer */
/* This is completely whacked, and I really need to
* find out why this is the case, but I need to
* release a 0.2.2, and as the next stable won't
* have the apple mDNS included, I guess it's a
* small price to pay.
*/
#ifdef FREEBSD
ptr += sizeof(ifr->ifr_name) + len; /* for next one in buffer */
// ptr += sizeof(*ifr);
#else
ptr += sizeof(struct ifreq); /* for next one in buffer */
#endif
// fprintf(stderr, "intf %d name=%s AF=%d\n", index, ifr->ifr_name, ifr->ifr_addr.sa_family); DPRINTF(E_DBG,L_REND,"intf %d name=%s AF=%d, flags=%08x\n", index, ifr->ifr_name, ifr->ifr_addr.sa_family,ifr->ifr_flags);
if (ifr->ifr_addr.sa_family != family) if (ifr->ifr_addr.sa_family != family)
continue; /* ignore if not desired address family */ continue; /* ignore if not desired address family */