From 1ffd497d7e4c0d55b30dcb94a8cb92ecb9df2bad Mon Sep 17 00:00:00 2001 From: Manuel Novoa III Date: Thu, 11 Mar 2004 17:35:09 +0000 Subject: [PATCH] Patch from "Kevin P. Fleming" , with some minor adjustments. --- make/mrouted.mk | 45 +++++++++++++++++++++++++++++++ sources/mrouted-sys_errlist.patch | 44 ++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 make/mrouted.mk create mode 100644 sources/mrouted-sys_errlist.patch diff --git a/make/mrouted.mk b/make/mrouted.mk new file mode 100644 index 0000000000..13a4f8c720 --- /dev/null +++ b/make/mrouted.mk @@ -0,0 +1,45 @@ +############################################################# +# +# mrouted +# +# +############################################################# +MROUTED_SOURCE:=mrouted_3.9-beta3.orig.tar.gz +MROUTED_SITE:=http://ftp.debian.org/debian/pool/non-free/m/mrouted +MROUTED_DIR:=$(BUILD_DIR)/mrouted-3.9-beta3.orig +MROUTED_CAT:=zcat +#MROUTED_PATCH:=$(SOURCE_DIR)/mrouted_3.9-beta3-1.1.diff +MROUTED_PATCH:=mrouted_3.9-beta3-1.1.diff.gz +MROUTED_BINARY:=mrouted +MROUTED_TARGET_BINARY:=usr/sbin/mrouted + +$(DL_DIR)/$(MROUTED_SOURCE): + $(WGET) -P $(DL_DIR) $(MROUTED_SITE)/$(MROUTED_SOURCE) + +$(DL_DIR)/$(MROUTED_PATCH): + $(WGET) -P $(DL_DIR) $(MROUTED_SITE)/$(MROUTED_PATCH) + +mrouted-source: $(DL_DIR)/$(MROUTED_SOURCE) $(DL_DIR)/$(MROUTED_PATCH) + +$(MROUTED_DIR)/.unpacked: mrouted-source + $(MROUTED_CAT) $(DL_DIR)/$(MROUTED_SOURCE) | tar -C $(BUILD_DIR) -xvf - + $(MROUTED_CAT) $(DL_DIR)/$(MROUTED_PATCH) | patch -p1 -d $(MROUTED_DIR) + $(SOURCE_DIR)/patch-kernel.sh $(MROUTED_DIR) $(SOURCE_DIR) mrouted-*.patch + touch $(MROUTED_DIR)/.unpacked + +$(MROUTED_DIR)/$(MROUTED_BINARY): $(MROUTED_DIR)/.unpacked + $(TARGET_CONFIGURE_OPTS) \ + $(MAKE) CC=$(TARGET_CC) -C $(MROUTED_DIR) + +$(TARGET_DIR)/$(MROUTED_TARGET_BINARY): $(MROUTED_DIR)/$(MROUTED_BINARY) + cp -a $(MROUTED_DIR)/$(MROUTED_BINARY) $(TARGET_DIR)/$(MROUTED_TARGET_BINARY) + +mrouted: uclibc $(TARGET_DIR)/$(MROUTED_TARGET_BINARY) + +mrouted-clean: + rm -f $(TARGET_DIR)/$(MROUTED_TARGET_BINARY) + -$(MAKE) -C $(MROUTED_DIR) clean + +mrouted-dirclean: + rm -rf $(MROUTED_DIR) + diff --git a/sources/mrouted-sys_errlist.patch b/sources/mrouted-sys_errlist.patch new file mode 100644 index 0000000000..8498dc743f --- /dev/null +++ b/sources/mrouted-sys_errlist.patch @@ -0,0 +1,44 @@ +Patches from Kevin P. Fleming . + +--- mrouted-3.9-beta3.orig/main.c~ 2004-03-10 19:00:38.000000000 -0700 ++++ mrouted-3.9-beta3.orig/main.c 2004-03-10 19:02:33.000000000 -0700 +@@ -1001,10 +1001,8 @@ + thyme->tm_min, thyme->tm_sec, now.tv_usec / 1000, msg); + if (syserr == 0) + fprintf(stderr, "\n"); +- else if (syserr < sys_nerr) +- fprintf(stderr, ": %s\n", sys_errlist[syserr]); + else +- fprintf(stderr, ": errno %d\n", syserr); ++ fprintf(stderr, ": %s\n", strerror(syserr)); + } + + /* +--- mrouted-3.9-beta3.orig/mrinfo.c~ 1998-02-28 20:05:20.000000000 -0700 ++++ mrouted-3.9-beta3.orig/mrinfo.c 2004-03-10 19:01:49.000000000 -0700 +@@ -159,10 +159,8 @@ + vfprintf(stderr, fmt, ap); + if (syserr == 0) + fprintf(stderr, "\n"); +- else if (syserr < sys_nerr) +- fprintf(stderr, ": %s\n", sys_errlist[syserr]); + else +- fprintf(stderr, ": errno %d\n", syserr); ++ fprintf(stderr, ": %s\n", strerror(syserr)); + } + + if (severity <= LOG_ERR) +--- mrouted-3.9-beta3.orig/mapper.c~ 1998-01-05 18:57:47.000000000 -0700 ++++ mrouted-3.9-beta3.orig/mapper.c 2004-03-10 19:02:04.000000000 -0700 +@@ -197,10 +197,8 @@ + vfprintf(stderr, fmt, ap); + if (syserr == 0) + fprintf(stderr, "\n"); +- else if (syserr < sys_nerr) +- fprintf(stderr, ": %s\n", sys_errlist[syserr]); + else +- fprintf(stderr, ": errno %d\n", syserr); ++ fprintf(stderr, ": %s\n", strerror(syserr)); + } + + if (severity <= LOG_ERR) -- 2.30.2