]> granicus.if.org Git - apache/commitdiff
backport mod_lua changes(r1524321): check for big endian and don't fiddle with bits...
authorDaniel Gruno <humbedooh@apache.org>
Wed, 18 Sep 2013 08:08:58 +0000 (08:08 +0000)
committerDaniel Gruno <humbedooh@apache.org>
Wed, 18 Sep 2013 08:08:58 +0000 (08:08 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1524328 13f79535-47bb-0310-9956-ffa450edef68

modules/lua/lua_request.c

index 23efcc2a4e721faf53fb129188e4c6237491b103..8dce13cc22d234b8e153ffa4460f6ff583fe706c 100644 (file)
@@ -1933,6 +1933,9 @@ 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;