From 2327bc8a32b97c14b18d7833546d87264e405ae0 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 15 Feb 2023 09:35:58 -0500 Subject: [PATCH] Fix test compiling/execution Add -fpermissive in %%check to work around invalid conversions in generated test code. The compiler flags for the installed library are not changed. --- llhttp.spec | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/llhttp.spec b/llhttp.spec index 514904c..d7e5c96 100644 --- a/llhttp.spec +++ b/llhttp.spec @@ -149,8 +149,18 @@ popd # code with license problems in the source RPM. %{python3} '%{SOURCE3}' --exceptions '%{SOURCE4}' --with dev node_modules_dev +%set_build_flags +# http-loose-request.c:7205:20: error: invalid conversion from 'void*' to +# 'const unsigned char*' [-fpermissive] +# 7205 | start = state->_span_pos0; +# | ~~~~~~~^~~~~~~~~~ +# | | +# | void* +export CXXFLAGS="${CXXFLAGS-} -fpermissive" +export CFLAGS="${CFLAGS-} -fpermissive" +export CLANG=gcc # See scripts.mocha in package.json: -NODE_ENV=test CLANG=gcc ./node_modules/.bin/mocha \ +NODE_ENV=test ./node_modules/.bin/mocha \ -r ts-node/register/type-check \ test/*-test.ts