]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: ssl_utils: fix build on gcc versions before 8
authorWilly Tarreau <w@1wt.eu>
Mon, 14 Nov 2022 07:11:32 +0000 (08:11 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 14 Nov 2022 10:12:49 +0000 (11:12 +0100)
commita8a83bcc80e4aadcd2d1dba36bb8f7e63c5cba22
tree7e3a24469797d9dd283ea0f868e743c8b8a99c79
parent4639689d89db2d18c4afbbe68e688a2b26b14b57
BUILD: ssl_utils: fix build on gcc versions before 8

Commit 960fb74ca ("MEDIUM: ssl: {ca,crt}-ignore-err can now use error
constant name") provided a very convenient way to initialize only desired
macros. Unfortunately with gcc versions older than 8, it breaks with:

  src/ssl_utils.c:473:12: error: initializer element is not constant

because it seems that the compiler cannot resolve strings to constants
at build time.

This patch takes a different approach, it stores the value of the macro
as a string and this string is converted to integer at boot time. This
way it works everywhere.
src/ssl_utils.c