From c5e8f8fe68d8a80aa49155ab692655f6d8870340 Mon Sep 17 00:00:00 2001 From: Jocelyn Le Sage Date: Sun, 5 Mar 2023 19:56:04 -0500 Subject: [PATCH] - Fixed architecture check when determining pointer size. - Size of sig_atomic_t is 4 bytes, not 8. --- src/openresty/build.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/openresty/build.sh b/src/openresty/build.sh index fcc4952..97c2d3b 100755 --- a/src/openresty/build.sh +++ b/src/openresty/build.sh @@ -100,8 +100,11 @@ curl -# -L https://github.com/openembedded/meta-openembedded/raw/master/meta-web curl -# -L https://github.com/openembedded/meta-openembedded/raw/master/meta-webserver/recipes-httpd/nginx/files/0001-Allow-the-overriding-of-the-endianness-via-the-confi.patch | patch -p1 -d "$NGINX_SRC_DIR" case "$(xx-info arch)" in - x86_64|aarch64) PTRSIZE=8 ;; - *) PTRSIZE=4 ;; + amd64) PTRSIZE=8; ENDIANNESS=little ;; + arm64) PTRSIZE=8; ENDIANNESS=little ;; + 386) PTRSIZE=4; ENDIANNESS=little ;; + arm) PTRSIZE=4; ENDIANNESS=little ;; + *) echo "Unknown ARCH: $(xx-info arch)" ; exit 1 ;; esac log "Configuring OpenResty..." @@ -133,11 +136,12 @@ log "Configuring OpenResty..." --with-threads \ --with-file-aio \ \ + --with-endian=$ENDIANNESS \ --with-int=4 \ --with-long=${PTRSIZE} \ --with-long-long=8 \ --with-ptr-size=${PTRSIZE} \ - --with-sig-atomic-t=${PTRSIZE} \ + --with-sig-atomic-t=4 \ --with-size-t=${PTRSIZE} \ --with-off-t=8 \ --with-time-t=${PTRSIZE} \