From patchwork Mon Aug 19 10:06:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 8023 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4WnSt70q3fz3x41 for ; Mon, 19 Aug 2024 10:06:23 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "E5" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4WnSt60WGlz5mg; Mon, 19 Aug 2024 10:06:22 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4WnSt600Nhz345F; Mon, 19 Aug 2024 10:06:22 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4WnSst6BmBz342b for ; Mon, 19 Aug 2024 10:06:10 +0000 (UTC) Received: from michael.haj.ipfire.org (michael.haj.ipfire.org [172.28.1.242]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "michael.haj.ipfire.org", Issuer "E5" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4WnSst4Zgxz5SL; Mon, 19 Aug 2024 10:06:10 +0000 (UTC) Received: by michael.haj.ipfire.org (Postfix, from userid 0) id 4WnSss6pTTzTtkp; Mon, 19 Aug 2024 10:06:09 +0000 (UTC) From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 12/19] squidguard: Fix compliation with GCC 14 Date: Mon, 19 Aug 2024 10:06:01 +0000 Message-Id: <20240819100608.991138-13-michael.tremer@ipfire.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240819100608.991138-1-michael.tremer@ipfire.org> References: <20240819100608.991138-1-michael.tremer@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: H4LTITCQICKXVSFDOKDZX4VDKP7FJAQE X-Message-ID-Hash: H4LTITCQICKXVSFDOKDZX4VDKP7FJAQE X-MailFrom: root@michael.haj.ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Michael Tremer X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Signed-off-by: Michael Tremer --- lfs/squidguard | 2 + src/patches/squidguard-1.6.0-configure.patch | 55 ++++++++++++++++++++ src/patches/squidguard-1.6.0-stdlib.patch | 22 ++++++++ 3 files changed, 79 insertions(+) create mode 100644 src/patches/squidguard-1.6.0-configure.patch create mode 100644 src/patches/squidguard-1.6.0-stdlib.patch diff --git a/lfs/squidguard b/lfs/squidguard index c5decc79f..b42110c5f 100644 --- a/lfs/squidguard +++ b/lfs/squidguard @@ -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 index 000000000..22c87498d --- /dev/null +++ b/src/patches/squidguard-1.6.0-configure.patch @@ -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 index 000000000..51489b32d --- /dev/null +++ b/src/patches/squidguard-1.6.0-stdlib.patch @@ -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 ++ #ifdef HAVE_STDLIB_H ++ #include ++ #endif + int main() + { + int major, minor, patch; +@@ -377,6 +378,9 @@ + + AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include ++ #ifdef HAVE_STDLIB_H ++ #include ++ #endif + int main() + { + int major, minor, patch;