summaryrefslogtreecommitdiffstats
path: root/modules/lua/lua_request.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/lua/lua_request.c')
-rw-r--r--modules/lua/lua_request.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/lua/lua_request.c b/modules/lua/lua_request.c
index 392554b813..d8e62937d5 100644
--- a/modules/lua/lua_request.c
+++ b/modules/lua/lua_request.c
@@ -1933,7 +1933,10 @@ static apr_uint64_t ap_ntoh64(const apr_uint64_t *input)
{
apr_uint64_t rval;
unsigned char *data = (unsigned char *)&rval;
-
+ if (APR_IS_BIGENDIAN) {
+ return *input;
+ }
+
data[0] = *input >> 56;
data[1] = *input >> 48;
data[2] = *input >> 40;