Commit d063208a authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

replace htonl with toku_htonl. addresses #1255

git-svn-id: file:///svn/toku/tokudb.1032b@7892 c7de825b-a66e-492c-adef-691d508d4ae1
parent 987c03b9
......@@ -23,7 +23,7 @@ static inline unsigned int rbuf_char (struct rbuf *r) {
static unsigned int rbuf_int (struct rbuf *r) {
#if 1
assert(r->ndone+4 <= r->size);
u_int32_t result = ntohl(*(u_int32_t*)(r->buf+r->ndone)); // This only works on machines where unaligned loads are OK.
u_int32_t result = toku_ntohl(*(u_int32_t*)(r->buf+r->ndone)); // This only works on machines where unaligned loads are OK.
r->ndone+=4;
return result;
#else
......
......@@ -50,7 +50,7 @@ static void wbuf_int (struct wbuf *w, int32_t i) {
w->buf[w->ndone+2] = i>>8;
w->buf[w->ndone+3] = i>>0;
#else
*(u_int32_t*)(&w->buf[w->ndone]) = htonl(i);
*(u_int32_t*)(&w->buf[w->ndone]) = toku_htonl(i);
#endif
x1764_add(&w->checksum, &w->buf[w->ndone], 4);
w->ndone += 4;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment