Skip to content
This repository was archived by the owner on Apr 10, 2025. It is now read-only.

Commit daa6031

Browse files
committed
Fix build with nginx-1.9.11+.
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
1 parent 6c3cc29 commit daa6031

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

config

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,13 @@ case "$NGX_GCC_VER" in
118118
;;
119119
esac
120120

121+
# workaround for a bug in nginx-1.9.11, see:
122+
# http://hg.nginx.org/nginx/rev/ff1e625ae55b
123+
NGX_VERSION=`grep nginx_version src/core/nginx.h | sed -e 's/^.* \(.*\)$/\1/'`
124+
if [ "$NGX_VERSION" = "1009011" ]; then
125+
CFLAGS="$CFLAGS -Wno-write-strings"
126+
fi
127+
121128
if [ "$WNO_ERROR" = "YES" ]; then
122129
CFLAGS="$CFLAGS -Wno-error"
123130
fi
@@ -228,9 +235,9 @@ if [ $ngx_found = yes ]; then
228235
if echo $HTTP_FILTER_MODULES | grep ngx_http_brotli_filter_module >/dev/null; then
229236
module=ngx_http_brotli_filter_module
230237
elif [ $HTTP_GZIP = YES ]; then
231-
module=$HTTP_GZIP_FILTER_MODULE
238+
module=ngx_http_gzip_filter_module
232239
else
233-
module=$HTTP_RANGE_HEADER_FILTER_MODULE
240+
module=ngx_http_range_header_filter_module
234241
fi
235242

236243
HTTP_FILTER_MODULES=$(echo $HTTP_FILTER_MODULES |\
@@ -239,7 +246,7 @@ if [ $ngx_found = yes ]; then
239246

240247
# Make the etag header filter run immediately before range header filter.
241248
HTTP_FILTER_MODULES=$(echo $HTTP_FILTER_MODULES |\
242-
sed "s/$HTTP_RANGE_HEADER_FILTER_MODULE/$HTTP_RANGE_HEADER_FILTER_MODULE ngx_pagespeed_etag_filter/")
249+
sed "s/ngx_http_range_header_filter_module/ngx_http_range_header_filter_module ngx_pagespeed_etag_filter/")
243250

244251
CORE_LIBS="$CORE_LIBS $pagespeed_libs"
245252
CORE_INCS="$CORE_INCS $pagespeed_include"

0 commit comments

Comments
 (0)