From 61d28047228839e90136983b8fcb1af4c294f948 Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Feb 24 2009 10:20:44 +0000 Subject: fix build with gcc 4.4 --- diff --git a/apcupsd-3.14.5-gcc44.patch b/apcupsd-3.14.5-gcc44.patch new file mode 100644 index 0000000..1f000b0 --- /dev/null +++ b/apcupsd-3.14.5-gcc44.patch @@ -0,0 +1,17 @@ +diff -up apcupsd-3.14.5/src/apcaccess.c.gcc44 apcupsd-3.14.5/src/apcaccess.c +--- apcupsd-3.14.5/src/apcaccess.c.gcc44 2009-02-24 10:36:35.781325750 +0100 ++++ apcupsd-3.14.5/src/apcaccess.c 2009-02-24 10:38:12.416285478 +0100 +@@ -86,10 +86,10 @@ int main(int argc, char **argv) + } + + if (argc > 2) { /* assume host:port */ +- char *p; ++ char *p = argv[2]; + +- host = argv[2]; +- p = strchr(host, ':'); ++ host = p; ++ p = strchr(p, ':'); + if (p) { + *p++ = 0; + port = atoi(p); diff --git a/apcupsd.spec b/apcupsd.spec index 6ea39a3..19c9ade 100644 --- a/apcupsd.spec +++ b/apcupsd.spec @@ -1,6 +1,6 @@ Name: apcupsd Version: 3.14.5 -Release: 2%{?dist} +Release: 3%{?dist} Summary: APC UPS Power Control Daemon for Linux Group: System Environment/Daemons @@ -11,6 +11,8 @@ Source1: apcupsd.logrotate Source2: apcupsd-httpd.conf Patch0: apcupsd-3.14.3-init.patch Patch1: apcupsd-3.14.4-shutdown.patch +Patch2: apcupsd-3.14.5-gcc44.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: glibc-devel >= 2.3, gd-devel > 2.0 @@ -57,6 +59,7 @@ A GUI interface to the APC UPS monitoring daemon. %setup -q %patch0 -p1 -b .init %patch1 -p1 -b .shutdown +%patch2 -p1 -b .gcc44 %build cp -p /usr/lib/rpm/config.{guess,sub} autoconf/ @@ -171,6 +174,9 @@ fi %changelog +* Thu Feb 24 2009 Michal Hlavinka - 3.14.5-3 +- fix build with gcc 4.4 + * Mon Feb 23 2009 Fedora Release Engineering - 3.14.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild