rpms/apcupsd/devel apcupsd-3.14.5-gcc44.patch, NONE, 1.1 apcupsd.spec, 1.30, 1.31

Michal Hlavinka mhlavink at fedoraproject.org
Tue Feb 24 10:21:15 UTC 2009


Author: mhlavink

Update of /cvs/extras/rpms/apcupsd/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv797

Modified Files:
	apcupsd.spec 
Added Files:
	apcupsd-3.14.5-gcc44.patch 
Log Message:
fix build with gcc 4.4


apcupsd-3.14.5-gcc44.patch:

--- NEW FILE apcupsd-3.14.5-gcc44.patch ---
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);


Index: apcupsd.spec
===================================================================
RCS file: /cvs/extras/rpms/apcupsd/devel/apcupsd.spec,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- apcupsd.spec	24 Feb 2009 01:21:08 -0000	1.30
+++ apcupsd.spec	24 Feb 2009 10:20:44 -0000	1.31
@@ -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 @@
 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 @@
 %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 @@
 
 
 %changelog
+* Thu Feb 24 2009 Michal Hlavinka <mhlavink at redhat.com> - 3.14.5-3
+- fix build with gcc 4.4
+
 * Mon Feb 23 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.14.5-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
 




More information about the fedora-extras-commits mailing list