$(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)
--- /dev/null
+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);