summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2024-01-30 11:13:06 -0500
committerMike Gilbert <floppym@gentoo.org>2024-01-30 11:13:06 -0500
commit645ac58671ce1918f13479ab38000a9ffc6e5f5e (patch)
tree7f0bcfa2f9b6d56c4913f6abddcdb419f3ac3cad /net-vpn
parentdev-util/gitlab-cli: add 1.36.0 (diff)
downloadgentoo-645ac58671ce1918f13479ab38000a9ffc6e5f5e.tar.gz
gentoo-645ac58671ce1918f13479ab38000a9ffc6e5f5e.tar.bz2
gentoo-645ac58671ce1918f13479ab38000a9ffc6e5f5e.zip
net-vpn/openconnect: fix implicit declaration of malloc
Closes: https://bugs.gentoo.org/923173 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'net-vpn')
-rw-r--r--net-vpn/openconnect/files/openconnect-9.12-stdlib.patch37
-rw-r--r--net-vpn/openconnect/openconnect-9.12.ebuild5
2 files changed, 41 insertions, 1 deletions
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