summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Ruppert <idl0r@gentoo.org>2020-11-09 09:35:45 +0100
committerChristian Ruppert <idl0r@gentoo.org>2020-11-09 09:36:03 +0100
commitb9d3fedad9c1bcb74eac279e1b3732cdb73c2236 (patch)
tree7046f29e9f4481c6c367e03098b78ae1e0c7ec94 /net-proxy/haproxy
parentxfce-extra/tumbler: Remove the dep on thunar (diff)
downloadgentoo-b9d3fedad9c1bcb74eac279e1b3732cdb73c2236.tar.gz
gentoo-b9d3fedad9c1bcb74eac279e1b3732cdb73c2236.tar.bz2
gentoo-b9d3fedad9c1bcb74eac279e1b3732cdb73c2236.zip
net-proxy/haproxy: Fix hpack compilation, bug 753509
Package-Manager: Portage-3.0.8, Repoman-3.0.2 Signed-off-by: Christian Ruppert <idl0r@gentoo.org>
Diffstat (limited to 'net-proxy/haproxy')
-rw-r--r--net-proxy/haproxy/files/haproxy-2.3.0-hpack-VAR_ARRAY.patch37
-rw-r--r--net-proxy/haproxy/haproxy-2.3.0.ebuild4
2 files changed, 38 insertions, 3 deletions
diff --git a/net-proxy/haproxy/files/haproxy-2.3.0-hpack-VAR_ARRAY.patch b/net-proxy/haproxy/files/haproxy-2.3.0-hpack-VAR_ARRAY.patch
new file mode 100644
index 000000000000..4f6bf4cf7174
--- /dev/null
+++ b/net-proxy/haproxy/files/haproxy-2.3.0-hpack-VAR_ARRAY.patch
@@ -0,0 +1,37 @@
+From 759146f0de143939b841ba987aabb83aa178a4fc Mon Sep 17 00:00:00 2001
+From: Christian Ruppert <idl0r@qasl.de>
+Date: Mon, 9 Nov 2020 09:15:21 +0100
+Subject: [PATCH] hpack-tbl-t.h uses VAR_ARRAY and requires compiler.h to be
+ included
+
+This fixes building hpack from contrib, which failed because of the
+undeclared VAR_ARRAY:
+
+make -C contrib/hpack
+...
+cc -O2 -Wall -g -I../../include -fwrapv -fno-strict-aliasing -c -o gen-enc.o gen-enc.c
+In file included from gen-enc.c:18:
+../../include/haproxy/hpack-tbl-t.h:105:23: error: 'VAR_ARRAY' undeclared here (not in a function)
+ 105 | struct hpack_dte dte[VAR_ARRAY]; /* dynamic table entries */
+...
+
+Signed-off-by: Christian Ruppert <idl0r@qasl.de>
+---
+ include/haproxy/hpack-tbl-t.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/include/haproxy/hpack-tbl-t.h b/include/haproxy/hpack-tbl-t.h
+index 344f665dd..07f1ca9ea 100644
+--- a/include/haproxy/hpack-tbl-t.h
++++ b/include/haproxy/hpack-tbl-t.h
+@@ -28,6 +28,7 @@
+ #define _HAPROXY_HPACK_TBL_T_H
+
+ #include <inttypes.h>
++#include "compiler.h"
+
+ /* Dynamic Headers Table, usable for tables up to 4GB long and values of 64kB-1.
+ * The model can be improved by using offsets relative to the table entry's end
+--
+2.26.2
+
diff --git a/net-proxy/haproxy/haproxy-2.3.0.ebuild b/net-proxy/haproxy/haproxy-2.3.0.ebuild
index d1c45681b560..e0be5d2ff6ed 100644
--- a/net-proxy/haproxy/haproxy-2.3.0.ebuild
+++ b/net-proxy/haproxy/haproxy-2.3.0.ebuild
@@ -51,6 +51,7 @@ RDEPEND="${DEPEND}
S="${WORKDIR}/${MY_P}"
+PATCHES=( "${FILESDIR}/${P}-hpack-VAR_ARRAY.patch" )
DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README )
CONTRIBS=( halog iprange )
# ip6range is present in 1.6, but broken.
@@ -94,9 +95,6 @@ src_compile() {
args+=( $(haproxy_use wurfl WURFL) )
args+=( $(haproxy_use systemd SYSTEMD) )
- # For now, until the strict-aliasing breakage will be fixed
- append-cflags -fno-strict-aliasing
-
# Bug #668002
if use ppc || use arm || use hppa; then
TARGET_LDFLAGS=-latomic