]> granicus.if.org Git - apache/commitdiff
mod_lua: ap_ntoh64 endianess test
authorDaniel Gruno <humbedooh@apache.org>
Wed, 18 Sep 2013 07:48:22 +0000 (07:48 +0000)
committerDaniel Gruno <humbedooh@apache.org>
Wed, 18 Sep 2013 07:48:22 +0000 (07:48 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1524321 13f79535-47bb-0310-9956-ffa450edef68

modules/lua/lua_request.c

index 392554b813ace47c4918e05cad4985ee0ec3774f..d8e62937d5b739977e1ed9f38553fd4edd7889df 100644 (file)
@@ -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;