gmediaserver/gmediaserver.patch

Wed, 08 Feb 2012 20:07:00 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 08 Feb 2012 20:07:00 +0200
changeset 588
300d43423c2e
permissions
-rw-r--r--

Update version, adapt patch, correct PID writing, correct build on newer
FreeBSD releases, and most importantly introduce new patch to try to
avoid segfault caused by multiple network interfaces with the same (or
no) address. This is common when configuring bridges and tunnels.

michael@75 1 Index: src/interface.c
michael@75 2 diff -Nau src/interface.c.orig src/interface.c
michael@75 3 --- src/interface.c.orig 2005-09-10 09:25:40.000000000 +0200
michael@75 4 +++ src/interface.c 2006-10-30 23:18:46.644745000 +0100
michael@75 5 @@ -28,8 +28,19 @@
michael@75 6 #include <net/if.h> /* ? */
michael@75 7 #include <netinet/in.h> /* ? */
michael@75 8 #include <arpa/inet.h> /* ? */
michael@75 9 +#if (defined(sun) && defined(__svr4__))
michael@75 10 +#include <sys/sockio.h>
michael@75 11 +#endif
michael@75 12 #include "gmediaserver.h"
michael@75 13
michael@75 14 +#ifndef MAX
michael@75 15 +#define MAX(a,b) ((a) > (b) ? (a) : (b))
michael@75 16 +#endif
michael@75 17 +
michael@75 18 +#ifndef MIN
michael@75 19 +#define MIN(a,b) ((a) < (b) ? (a) : (b))
michael@75 20 +#endif
michael@75 21 +
michael@75 22 char *
michael@75 23 get_ip_by_spec(char *spec)
michael@75 24 {
michael@75 25 Index: src/metadata.c
michael@75 26 diff -Nau src/metadata.c.orig src/metadata.c
michael@75 27 --- src/metadata.c.orig 2007-02-27 14:10:38.630894000 +0100
michael@75 28 +++ src/metadata.c 2007-02-27 14:11:50.191849000 +0100
michael@75 29 @@ -1071,6 +1071,7 @@
michael@75 30 uint32_t c;
michael@75 31 uint32_t child_count = 0;
michael@75 32
michael@75 33 + root_entry = make_entry(ROOT_ENTRY_NAME, -1, true);
michael@75 34 children = xmalloc(sizeof(int32_t) * pathc);
michael@75 35 for (c = 0; c < pathc; c++) {
michael@75 36 Entry *entry;
michael@75 37 @@ -1088,13 +1089,12 @@
michael@75 38 free(tmp);
michael@75 39 }
michael@75 40
michael@75 41 - entry = scan_entry(pathv[c], name, -1, indent_size, NULL);
michael@75 42 + entry = scan_entry(pathv[c], name, root_entry->id, indent_size, NULL);
michael@75 43 if (entry != NULL)
michael@75 44 children[child_count++] = entry->id;
michael@75 45 free(name);
michael@75 46 }
michael@75 47 if (child_count != 0) {
michael@75 48 - root_entry = make_entry(ROOT_ENTRY_NAME, -1, true);
michael@75 49 detail = get_entry_detail(root_entry, DETAIL_CHILDREN);
michael@75 50 detail->data.children.count = child_count;
michael@75 51 detail->data.children.list = children;
michael@75 52 Index: lib/Makefile.in
michael@75 53 diff -Nau lib/Makefile.in.orig lib/Makefile.in
michael@75 54 --- lib/Makefile.in.orig 2006-08-29 22:53:57.000000000 +0200
michael@75 55 +++ lib/Makefile.in 2006-11-01 10:25:38.000000000 +0100
michael@75 56 @@ -112,7 +112,16 @@
michael@75 57 full-write.$(OBJEXT) getnline.$(OBJEXT) progname.$(OBJEXT) \
michael@75 58 striconv.$(OBJEXT) version-etc.$(OBJEXT) xalloc-die.$(OBJEXT) \
michael@75 59 xgethostname.$(OBJEXT) xstrndup.$(OBJEXT) xvasprintf.$(OBJEXT) \
michael@75 60 - xasprintf.$(OBJEXT)
michael@75 61 + xasprintf.$(OBJEXT) xmalloc.$(OBJEXT) quote.$(OBJEXT) error.$(OBJEXT) \
michael@75 62 + quotearg.$(OBJEXT) strftime.$(OBJEXT) \
michael@75 63 + strndup.$(OBJEXT) strnlen.$(OBJEXT) \
michael@75 64 + getopt.$(OBJEXT) getopt1.$(OBJEXT) \
michael@75 65 + basename.$(OBJEXT) dirname.$(OBJEXT) \
michael@75 66 + vasprintf.$(OBJEXT) vasnprintf.$(OBJEXT) \
michael@75 67 + full-read.$(OBJEXT) safe-read.$(OBJEXT) \
michael@75 68 + full-write.$(OBJEXT) safe-write.$(OBJEXT) \
michael@75 69 + printf-args.$(OBJEXT) printf-parse.$(OBJEXT) \
michael@75 70 + exitfail.$(OBJEXT) getndelim2.$(OBJEXT) sig2str.$(OBJEXT)
michael@75 71 libgnu_a_OBJECTS = $(am_libgnu_a_OBJECTS)
michael@75 72 LTLIBRARIES = $(noinst_LTLIBRARIES)
michael@75 73 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
michael@75 74 @@ -553,7 +562,7 @@
michael@75 75 -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
michael@75 76 libgnu.a: $(libgnu_a_OBJECTS) $(libgnu_a_DEPENDENCIES)
michael@75 77 -rm -f libgnu.a
michael@75 78 - $(libgnu_a_AR) libgnu.a $(libgnu_a_OBJECTS) $(libgnu_a_LIBADD)
michael@75 79 + $(libgnu_a_AR) libgnu.a $(libgnu_a_OBJECTS)
michael@75 80 $(RANLIB) libgnu.a
michael@75 81
michael@75 82 clean-noinstLTLIBRARIES:

mercurial