nginx: update to 1.12.0, the latest stable version
[feed/packages.git] / net / nginx / patches / 102-sizeof_test_fix.patch
1 --- a/auto/types/sizeof
2 +++ b/auto/types/sizeof
3 @@ -25,8 +25,14 @@ $NGX_INCLUDE_UNISTD_H
4 $NGX_INCLUDE_INTTYPES_H
5 $NGX_INCLUDE_AUTO_CONFIG_H
6
7 +char object_code_block[] = {
8 + '\n', 'e', '4', 'V', 'A',
9 + '0', 'x', ('0' + sizeof($ngx_type)),
10 + 'Y', '3', 'p', 'M', '\n'
11 +};
12 +
13 int main(void) {
14 - printf("%d", (int) sizeof($ngx_type));
15 + printf("dummy use of object_code_block to avoid gc-section: %c", object_code_block[0]);
16 return 0;
17 }
18
19 @@ -40,7 +45,7 @@ eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&
20
21
22 if [ -x $NGX_AUTOTEST ]; then
23 - ngx_size=`$NGX_AUTOTEST`
24 + ngx_size=`sed -ne 's/^e4VA0x\(.\)Y3pM$/\1/p' < $NGX_AUTOTEST`
25 echo " $ngx_size bytes"
26 fi
27