diff options
author | Torsten Veller <tove@gentoo.org> | 2008-04-24 06:58:39 +0000 |
---|---|---|
committer | Torsten Veller <tove@gentoo.org> | 2008-04-24 06:58:39 +0000 |
commit | 7dcea689c3c3569cc01f1a1306b6f40913ffe1de (patch) | |
tree | 7ca1192f6ed0979197c577d4ee461c665ec5422e /net-misc/chrony | |
parent | Fix DESCRIPTION wording per nightmorph's suggestion. Also fix quoting QA warn... (diff) | |
download | gentoo-2-7dcea689c3c3569cc01f1a1306b6f40913ffe1de.tar.gz gentoo-2-7dcea689c3c3569cc01f1a1306b6f40913ffe1de.tar.bz2 gentoo-2-7dcea689c3c3569cc01f1a1306b6f40913ffe1de.zip |
Make the sources command output properly signed numbers.
(Portage version: 2.1.5_rc6)
Diffstat (limited to 'net-misc/chrony')
-rw-r--r-- | net-misc/chrony/ChangeLog | 6 | ||||
-rw-r--r-- | net-misc/chrony/chrony-1.23.ebuild | 3 | ||||
-rw-r--r-- | net-misc/chrony/files/chrony-1.23-sources.diff | 56 |
3 files changed, 63 insertions, 2 deletions
diff --git a/net-misc/chrony/ChangeLog b/net-misc/chrony/ChangeLog index 217c79119886..77c1e85b1e5b 100644 --- a/net-misc/chrony/ChangeLog +++ b/net-misc/chrony/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-misc/chrony # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/chrony/ChangeLog,v 1.42 2008/03/29 08:11:16 tove Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/chrony/ChangeLog,v 1.43 2008/04/24 06:58:39 tove Exp $ + + 24 Apr 2008; Torsten Veller <tove@gentoo.org> + +files/chrony-1.23-sources.diff, chrony-1.23.ebuild: + Make the sources command output properly signed numbers. 29 Mar 2008; Torsten Veller <tove@gentoo.org> -chrony-1.21-r1.ebuild: Cleaning diff --git a/net-misc/chrony/chrony-1.23.ebuild b/net-misc/chrony/chrony-1.23.ebuild index 9acd6d5ef7ad..7be7ab66bf39 100644 --- a/net-misc/chrony/chrony-1.23.ebuild +++ b/net-misc/chrony/chrony-1.23.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/chrony/chrony-1.23.ebuild,v 1.4 2008/03/28 14:46:43 nixnut Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/chrony/chrony-1.23.ebuild,v 1.5 2008/04/24 06:58:39 tove Exp $ inherit eutils toolchain-funcs @@ -23,6 +23,7 @@ src_unpack() { epatch "${FILESDIR}"/${PN}-1.20-conf.c-gentoo.diff epatch "${FILESDIR}"/${PN}-1.20-chrony.conf.example-gentoo.diff epatch "${FILESDIR}"/${PN}-1.21-makefile.diff + epatch "${FILESDIR}"/${P}-sources.diff sed -i "s:/etc/chrony:/etc/chrony/chrony:g" \ chrony*.{1,5,8} faq.txt chrony.texi || die "sed failed" diff --git a/net-misc/chrony/files/chrony-1.23-sources.diff b/net-misc/chrony/files/chrony-1.23-sources.diff new file mode 100644 index 000000000000..5f39ca3321f1 --- /dev/null +++ b/net-misc/chrony/files/chrony-1.23-sources.diff @@ -0,0 +1,56 @@ +commit 2f2446c7dc074b2d1728a5e3f7a600c10cea2425 +Author: Goswin Brederlow <brederlo@informatik.uni-tuebingen.de> +Date: Sat Mar 29 20:49:59 2008 +0000 + + Fix for chronyc "sources" command on 64 bit machines + + (Taken from + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=348412 + ) + + Attached is a patchlet to make the "sources" command of chrony output properly + signed numbers. The chronyd code (see e.g. ntp.h) properly uses int32_t and + friends to get the right number of bits per datatype while client.c just uses + short, int, long. But long will be 64 bit or 32 bit depending on the cpu. + +diff --git a/client.c b/client.c +index b7e5bcb..85d6e84 100644 +--- a/client.c ++++ b/client.c +@@ -45,6 +45,12 @@ + #include <readline/history.h> + #endif + ++#ifdef HAS_STDINT_H ++#include <stdint.h> ++#elif defined(HAS_INTTYPES_H) ++#include <inttypes.h> ++#endif ++ + /* ================================================== */ + + static int sock_fd; +@@ -1383,16 +1389,16 @@ process_cmd_sources(char *line) + int n_sources, i; + int verbose = 0; + +- long orig_latest_meas, latest_meas, est_offset; +- unsigned long ip_addr; +- unsigned long latest_meas_err, est_offset_err; +- unsigned long latest_meas_ago; +- unsigned short poll, stratum; +- unsigned short state, mode; ++ int32_t orig_latest_meas, latest_meas, est_offset; ++ uint32_t ip_addr; ++ uint32_t latest_meas_err, est_offset_err; ++ uint32_t latest_meas_ago; ++ uint16_t poll, stratum; ++ uint16_t state, mode; + double resid_freq, resid_skew; + const char *dns_lookup; + char hostname_buf[32]; +- unsigned short status; ++ uint16_t status; + + /* Check whether to output verbose headers */ + verbose = check_for_verbose_flag(line); |