[package] add nginx, patch from Benjamin Cama
[openwrt/svn-archive/archive.git] / net / nginx / patches / 002-sizeof_test_fix
1 diff --git a/auto/types/sizeof b/auto/types/sizeof
2 index 4d65dca..2d5da3e 100644
3 --- a/auto/types/sizeof
4 +++ b/auto/types/sizeof
5 @@ -23,8 +23,13 @@ $NGX_INCLUDE_UNISTD_H
6 $NGX_INCLUDE_INTTYPES_H
7 $NGX_INCLUDE_AUTO_CONFIG_H
8
9 +char object_code_block[] = {
10 + '\n', 'e', '4', 'V', 'A',
11 + '0', 'x', ('0' + sizeof($ngx_type)),
12 + 'Y', '3', 'p', 'M', '\n'
13 +};
14 +
15 int main() {
16 - printf("%d", sizeof($ngx_type));
17 return 0;
18 }
19
20 @@ -38,7 +43,7 @@ eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
21
22
23 if [ -x $NGX_AUTOTEST ]; then
24 - ngx_size=`$NGX_AUTOTEST`
25 + ngx_size=`sed -ne 's/^e4VA0x\(.\)Y3pM$/\1/p' < $NGX_AUTOTEST`
26 echo " $ngx_size bytes"
27 fi
28