[oe] [meta-webserver] [PATCH] fix nginx with large files support
Wangchong Zhou
fffonion at gmail.com
Tue Oct 24 22:27:31 UTC 2017
Resend a patch using largefile DISTRO_FEATURES.
Signed-off-by: Wangchong Zhou <fffonion at gmail.com>
---
meta-webserver/recipes-httpd/nginx/nginx.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta-webserver/recipes-httpd/nginx/nginx.inc
b/meta-webserver/recipes-httpd/nginx/nginx.inc
index 4a97e2670..84ce0fb4d 100644
--- a/meta-webserver/recipes-httpd/nginx/nginx.inc
+++ b/meta-webserver/recipes-httpd/nginx/nginx.inc
@@ -57,7 +57,7 @@ do_configure () {
--with-ptr-size=${PTRSIZE} \
--with-sig-atomic-t=${PTRSIZE} \
--with-size-t=${PTRSIZE} \
- --with-off-t=${PTRSIZE} \
+
--with-off-t=${@bb.utils.contains('DISTRO_FEATURES','largefile','8','4',d)};
\
--with-time-t=${PTRSIZE} \
--with-sys-nerr=132 \
--conf-path=${sysconfdir}/nginx/nginx.conf \
--
2.13.5
On Tue, Oct 24, 2017 at 2:28 PM, Wangchong Zhou <fffonion at gmail.com> wrote:
>
> Hi,
> The nginx receipt hardcoded size of off_t to be same as ptrsize, which
can break large files support on 32bit machines. The http range header will
fail with a code 416 on files bigger than 2G. Changing it to 8 will fix the
problem.
>
> I don't think hardcode off_t to 8 is a neat way of fixing this. Is there
a better way to detect large files support?
>
>
> Author: Wangchong Zhou <fffonion at gmail.com>
> Date: Tue Oct 24 14:21:35 2017 -0400
>
> fix large files support in nginx by setting off_t to 8 bytes
>
> Signed-off-by: Wangchong Zhou <fffonion at gmail.com>
>
> diff --git a/meta-webserver/recipes-httpd/nginx/nginx.inc
b/meta-webserver/recipes-httpd/nginx/nginx.inc
> index 4a97e2670..4cdf892c7 100644
> --- a/meta-webserver/recipes-httpd/nginx/nginx.inc
> +++ b/meta-webserver/recipes-httpd/nginx/nginx.inc
> @@ -57,7 +57,7 @@ do_configure () {
> --with-ptr-size=${PTRSIZE} \
> --with-sig-atomic-t=${PTRSIZE} \
> --with-size-t=${PTRSIZE} \
> - --with-off-t=${PTRSIZE} \
> + --with-off-t=8 \
> --with-time-t=${PTRSIZE} \
> --with-sys-nerr=132 \
> --conf-path=${sysconfdir}/nginx/nginx.conf \
>
>
--
Regards
fffonion (B607 2745 84E8 D5E5)
More information about the Openembedded-devel
mailing list