From 8c209fabbd4ba2f1d6f3a267059c758b4697a433 Mon Sep 17 00:00:00 2001 From: Wangchong Zhou Date: Tue, 28 Sep 2021 16:19:52 +0800 Subject: [PATCH] fix(auxiliary/nginx) set off_t to 64bit per nginx config (#32) Fix #16 --- lib/resty/openssl/auxiliary/nginx.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/resty/openssl/auxiliary/nginx.lua b/lib/resty/openssl/auxiliary/nginx.lua index bc0b0320..a65b98ca 100644 --- a/lib/resty/openssl/auxiliary/nginx.lua +++ b/lib/resty/openssl/auxiliary/nginx.lua @@ -12,7 +12,8 @@ else local ffi = require "ffi" ffi.cdef [[ - typedef long off_t; + // Nginx seems to always config _FILE_OFFSET_BITS=64, this should always be 8 byte + typedef long long off_t; typedef unsigned int socklen_t; // windows uses int, same size typedef unsigned short in_port_t;