From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1595832-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id C5C6C15838C
	for <garchives@archives.gentoo.org>; Tue, 30 Jan 2024 16:14:02 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 0CD5B2BC071;
	Tue, 30 Jan 2024 16:14:02 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(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)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id DB3352BC071
	for <gentoo-commits@lists.gentoo.org>; Tue, 30 Jan 2024 16:14:01 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(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)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id C9BD43430AC
	for <gentoo-commits@lists.gentoo.org>; Tue, 30 Jan 2024 16:14:00 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 16996FA7
	for <gentoo-commits@lists.gentoo.org>; Tue, 30 Jan 2024 16:13:59 +0000 (UTC)
From: "Mike Gilbert" <floppym@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" <floppym@gentoo.org>
Message-ID: <1706631186.645ac58671ce1918f13479ab38000a9ffc6e5f5e.floppym@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: net-vpn/openconnect/files/, net-vpn/openconnect/
X-VCS-Repository: repo/gentoo
X-VCS-Files: net-vpn/openconnect/files/openconnect-9.12-stdlib.patch net-vpn/openconnect/openconnect-9.12.ebuild
X-VCS-Directories: net-vpn/openconnect/ net-vpn/openconnect/files/
X-VCS-Committer: floppym
X-VCS-Committer-Name: Mike Gilbert
X-VCS-Revision: 645ac58671ce1918f13479ab38000a9ffc6e5f5e
X-VCS-Branch: master
Date: Tue, 30 Jan 2024 16:13:59 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 0be91570-103d-490e-8af6-ce94453aed38
X-Archives-Hash: 87e67cc2bd8e4b121b35d63dab4dd679

commit:     645ac58671ce1918f13479ab38000a9ffc6e5f5e
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 30 16:13:06 2024 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue Jan 30 16:13:06 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=645ac586

net-vpn/openconnect: fix implicit declaration of malloc

Closes: https://bugs.gentoo.org/923173
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 .../files/openconnect-9.12-stdlib.patch            | 37 ++++++++++++++++++++++
 net-vpn/openconnect/openconnect-9.12.ebuild        |  5 ++-
 2 files changed, 41 insertions(+), 1 deletion(-)

diff --git a/net-vpn/openconnect/files/openconnect-9.12-stdlib.patch b/net-vpn/openconnect/files/openconnect-9.12-stdlib.patch
new file mode 100644
index 000000000000..6e8ce06a8bef
--- /dev/null
+++ b/net-vpn/openconnect/files/openconnect-9.12-stdlib.patch
@@ -0,0 +1,37 @@
+https://gitlab.com/openconnect/openconnect/-/merge_requests/533
+
+From 5f59c2efa27295d6b3675a8b750357a6e883c45d Mon Sep 17 00:00:00 2001
+From: Brahmajit Das <brahmajit.xyz@gmail.com>
+Date: Mon, 29 Jan 2024 23:28:53 +0530
+Subject: [PATCH] Fix implicit declaration of function 'malloc'
+
+First observed on Gentoo Linux with GCC 14. This is due to GCC 14
+enabling -Werror=implicit-function-declaration by default.
+Thus resulting in errors such as:
+
+openconnect-internal.h: In function 'alloc_pkt':
+openconnect-internal.h:911:27: error: implicit declaration of function 'malloc' [-Werror=implicit-function-declaration]
+  911 |         struct pkt *pkt = malloc(alloc_len);
+      |                           ^~~~~~
+
+Plese refer gentoo bug: https://bugs.gentoo.org/923173
+Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
+---
+ openconnect-internal.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/openconnect-internal.h b/openconnect-internal.h
+index 21460adf..5abfe98d 100644
+--- a/openconnect-internal.h
++++ b/openconnect-internal.h
+@@ -119,6 +119,7 @@
+ #include <sys/types.h>
+ 
+ #include <stdint.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include <errno.h>
+ 
+-- 
+2.43.0
+

diff --git a/net-vpn/openconnect/openconnect-9.12.ebuild b/net-vpn/openconnect/openconnect-9.12.ebuild
index f98706b42254..3918970bc11e 100644
--- a/net-vpn/openconnect/openconnect-9.12.ebuild
+++ b/net-vpn/openconnect/openconnect-9.12.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2011-2023 Gentoo Authors
+# Copyright 2011-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -86,6 +86,9 @@ pkg_setup() {
 }
 
 src_prepare() {
+	local PATCHES=(
+		"${FILESDIR}/openconnect-9.12-stdlib.patch"
+	)
 	default
 	if [[ ${PV} == 9999 ]]; then
 		eautoreconf