]> git.ipfire.org Git - people/mfischer/ipfire-2.x.git/commitdiff
squidguard: Fix compliation with GCC 14
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 6 Aug 2024 13:57:11 +0000 (13:57 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 19 Aug 2024 10:01:01 +0000 (10:01 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/squidguard
src/patches/squidguard-1.6.0-configure.patch [new file with mode: 0644]
src/patches/squidguard-1.6.0-stdlib.patch [new file with mode: 0644]

index c5decc79f0b3152a2284d49615f26461c985e0e8..b42110c5f6ee0d85abcce27546334a5e21f40a5d 100644 (file)
@@ -72,6 +72,8 @@ $(subst %,%_BLAKE2,$(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/squidguard-1.6.0-stdlib.patch
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/squidguard-1.6.0-configure.patch
        cd $(DIR_APP) && ./autogen.sh
        cd $(DIR_APP) && ./configure \
                --prefix=/usr \
diff --git a/src/patches/squidguard-1.6.0-configure.patch b/src/patches/squidguard-1.6.0-configure.patch
new file mode 100644 (file)
index 0000000..22c8749
--- /dev/null
@@ -0,0 +1,55 @@
+--- squidguard-1.6.0/configure.ac~     2024-08-06 10:40:16.797400705 +0000
++++ squidguard-1.6.0/configure.ac      2024-08-06 10:41:36.321245621 +0000
+@@ -237,7 +237,7 @@
+         {
+            LDAP *p;
+            p = ldap_init("localhost", LDAP_PORT);
+-           exit(0);
++           return 0;
+         }
+         ]])],,[
+            echo
+@@ -358,8 +358,8 @@
+ #endif
+         ver = major + ((float) minor / 1000);
+         if (ver >= 2.006)
+-                      exit (0);
+-              exit (1);
++                      return 0;
++              return 1;
+       }       
+       ]])],
+       [db_ok_version=yes],
+@@ -396,8 +396,8 @@
+ #endif
+         ver = major + ((float) minor / 1000);
+         if (ver > 2.007 && ver < 3.002)
+-                      exit (1);
+-              exit (0);
++                      return 1;
++              return 0;
+       }       
+       ]])],
+       [db_ok_version=yes],
+@@ -432,8 +432,8 @@
+ #endif
+         ver = major + ((float) minor / 1000);
+         if (ver >= 3.002)
+-                      exit (0);
+-              exit (1);
++                      return 0;
++              return 1;
+       }       
+       ]])],
+       [dbg2_ok_version=yes],
+@@ -460,8 +460,8 @@
+ #endif
+         ver = major + ((float) minor / 1000);
+         if (ver >= 4.002)
+-                      exit (0);
+-              exit (1);
++                      return 0;
++              return 1;
+       }       
+       ]])],
+       [dbg3_ok_version=yes],
diff --git a/src/patches/squidguard-1.6.0-stdlib.patch b/src/patches/squidguard-1.6.0-stdlib.patch
new file mode 100644 (file)
index 0000000..51489b3
--- /dev/null
@@ -0,0 +1,22 @@
+--- a/configure.ac     2022-12-15 10:33:13.845801113 +0300
++++ b/configure.ac     2022-12-15 10:33:39.828949903 +0300
+@@ -342,6 +342,9 @@
+ LIBS="$LIBS -ldb"
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+     #include <db.h>
++    #ifdef HAVE_STDLIB_H
++        #include <stdlib.h>
++    #endif
+     int main() 
+     {
+         int major, minor, patch;
+@@ -377,6 +378,9 @@
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+     #include <db.h>
++    #ifdef HAVE_STDLIB_H
++        #include <stdlib.h>
++    #endif
+     int main() 
+     {
+         int major, minor, patch;