]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Merge branch 'glibc-update2' of ssh://git.ipfire.org/pub/git/people/ms/ipfire-2.x...
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 19 Aug 2012 22:14:18 +0000 (18:14 -0400)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 19 Aug 2012 22:14:18 +0000 (18:14 -0400)
lfs/apcupsd
src/patches/apcupsd-3.14.4-fix-gcc44.patch [new file with mode: 0644]

index 5638cabc3d3a7f38f791da84affb512ebd3d40e9..a0da9357eb014413011ae86659d7cd98c2de5062 100644 (file)
@@ -77,6 +77,7 @@ $(subst %,%_MD5,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/apcupsd-3.14.4-fix-gcc44.patch
        cd $(DIR_APP) && ./configure --prefix=/usr --enable-usb --enable-cgi \
                                        --with-cgi-bin=/srv/web/ipfire/cgi-bin
        cd $(DIR_APP) && make $(MAKETUNING)
diff --git a/src/patches/apcupsd-3.14.4-fix-gcc44.patch b/src/patches/apcupsd-3.14.4-fix-gcc44.patch
new file mode 100644 (file)
index 0000000..0052098
--- /dev/null
@@ -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);