BUILD: hpack: hpack-tbl-t.h uses VAR_ARRAY but does not include compiler.h
authorChristian Ruppert <idl0r@qasl.de>
Mon, 9 Nov 2020 08:15:21 +0000 (09:15 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 22 Dec 2020 09:18:07 +0000 (10:18 +0100)
commitb67e1558955c1c88dc2a3530322802ce3710bc88
tree3db2f1661e3e0eb4e72aab44993e7c125772f059
parent12a08d8849166ec0a779bbdee2ce9d768d5aa824
BUILD: hpack: hpack-tbl-t.h uses VAR_ARRAY but does not include compiler.h

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 */
...

As discussed in the thread below, let's redefine VAR_ARRAY in this file
so that it remains self-sustaining:

   https://www.mail-archive.com/haproxy@formilux.org/msg39212.html
include/haproxy/hpack-tbl-t.h