소스 검색

Fix compile error on big endian platform

Tatsuhiro Tsujikawa 11 년 전
부모
커밋
98681552fc
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      src/util_security.cc

+ 1 - 2
src/util_security.cc

@@ -37,7 +37,6 @@
 
 #include "FatalException.h"
 #include "util.h"
-#include "crypto_endian.h"
 
 namespace {
 using namespace aria2;
@@ -166,7 +165,7 @@ HMACResult PBKDF2(HMAC* hmac,
 
   for (uint32_t counter = 1; key_length; ++counter) {
     hmac->update(salt, salt_length);
-    const uint32_t c = crypto::__crypto_be(counter);
+    const uint32_t c = htonl(counter);
     hmac->update((char*)&c, sizeof(c));
 
     auto bytes = hmac->getResult().getBytes();