Package: collectd Version: 4.6.2-1 Followup-For: Bug #526667 User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu karmic ubuntu-patch
*** /tmp/tmpN6OtrJ In Ubuntu, we've applied the attached patch to achieve the following: - debian/patches/upstream_fix_ftbfs.dpatch - Fix FTBFS with gcc4.4 by cherrypicking the change from upstream's git-repository. We thought you might be interested in doing the same. -- System Information: Debian Release: squeeze/sid APT prefers karmic APT policy: (500, 'karmic') Architecture: i386 (i686) Kernel: Linux 2.6.28-11-generic (SMP w/1 CPU core) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
diff -u collectd-4.6.2/debian/patches/00list collectd-4.6.2/debian/patches/00list --- collectd-4.6.2/debian/patches/00list +++ collectd-4.6.2/debian/patches/00list @@ -2,2 +2,4 @@ collection_conf_path.dpatch +upstream_fix_ftbfs.dpatch + only in patch2: unchanged: --- collectd-4.6.2.orig/debian/patches/upstream_fix_ftbfs.dpatch +++ collectd-4.6.2/debian/patches/upstream_fix_ftbfs.dpatch @@ -0,0 +1,56 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## upstream_fix_ftbfs.dpatch by Andreas Moog <am...@ubuntu.com> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix a FTBFS with gcc4.4 by cherrypicking the change from upstream. + +...@dpatch@ +diff -urNad collectd-4.6.2~/src/ntpd.c collectd-4.6.2/src/ntpd.c +--- collectd-4.6.2~/src/ntpd.c 2009-04-14 04:25:31.000000000 +0200 ++++ collectd-4.6.2/src/ntpd.c 2009-05-08 01:35:06.000000000 +0200 +@@ -878,25 +878,33 @@ + + if (ptr->v6_flag) + { +- struct sockaddr_in6 *sa_ptr; +- sa_ptr = (struct sockaddr_in6 *) &sa; ++ struct sockaddr_in6 sa6; + +- sa_ptr->sin6_family = AF_INET6; +- sa_ptr->sin6_port = htons (123); +- memcpy (&sa_ptr->sin6_addr, &ptr->srcadr6, ++ assert (sizeof (sa) >= sizeof (sa6)); ++ ++ memset (&sa6, 0, sizeof (sa6)); ++ sa6.sin6_family = AF_INET6; ++ sa6.sin6_port = htons (123); ++ memcpy (&sa6.sin6_addr, &ptr->srcadr6, + sizeof (struct in6_addr)); +- sa_len = sizeof (struct sockaddr_in6); ++ sa_len = sizeof (sa6); ++ ++ memcpy (&sa, &sa6, sizeof (sa6)); + } + else + { +- struct sockaddr_in *sa_ptr; +- sa_ptr = (struct sockaddr_in *) &sa; ++ struct sockaddr_in sa4; + +- sa_ptr->sin_family = AF_INET; +- sa_ptr->sin_port = htons (123); +- memcpy (&sa_ptr->sin_addr, &ptr->srcadr, ++ assert (sizeof (sa) >= sizeof (sa4)); ++ ++ memset (&sa4, 0, sizeof (sa4)); ++ sa4.sin_family = AF_INET; ++ sa4.sin_port = htons (123); ++ memcpy (&sa4.sin_addr, &ptr->srcadr, + sizeof (struct in_addr)); +- sa_len = sizeof (struct sockaddr_in); ++ sa_len = sizeof (sa4); ++ ++ memcpy (&sa, &sa4, sizeof (sa4)); + } + + if (do_reverse_lookups == 0)