Skip to content

Commit d38a95e

Browse files
authored
Merge pull request #351 from theseion/work-around-configure-issue-in-gcc-14
fix: work around configure issue with GCC 14+
2 parents 60421a8 + 1d9dd4b commit d38a95e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

nginx/Dockerfile-alpine

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ RUN set -eux; \
5353
make -j$(nproc) install; \
5454
strip /usr/local/modsecurity/lib/lib*.so*
5555

56-
# Build modules
56+
# Build modules
57+
# Note the `sed` line. It patches the configure test for ModSecurity-nginx
58+
# so that it works with GCC 14+.
59+
# Once https://github.com/owasp-modsecurity/ModSecurity-nginx/pull/275 has
60+
# been released, this workaround can be removed again.
5761
RUN set -eux; \
5862
modules=""; \
5963
set -- ${NGINX_DYNAMIC_MODULES}; \
@@ -66,6 +70,7 @@ RUN set -eux; \
6670
git clone -b "${version}" --depth 1 "https://github.com/${owner}/${name}.git"; \
6771
modules="${modules} --add-dynamic-module=../${name}"; \
6872
done; \
73+
sed -iE "s/ngx_feature_test='printf(\"hello\");'/ngx_feature_test='msc_init();'/" ModSecurity-nginx/config; \
6974
curl -sSL "https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -o nginx-${NGINX_VERSION}.tar.gz; \
7075
tar -xzf nginx-${NGINX_VERSION}.tar.gz; \
7176
cd ./nginx-${NGINX_VERSION}; \

0 commit comments

Comments
 (0)