From c69683a3ed52209fafa165c4e78cc49e4a60dd6b Mon Sep 17 00:00:00 2001 From: Trond Norbye Date: Thu, 2 Sep 2010 10:23:44 +0200 Subject: [PATCH] Bug 628650: prefix ntohll/htonll with memcached_ --- libmemcached/byteorder.c | 4 ++-- libmemcached/byteorder.h | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libmemcached/byteorder.c b/libmemcached/byteorder.c index 96a39bf8..97d14f2b 100644 --- a/libmemcached/byteorder.c +++ b/libmemcached/byteorder.c @@ -32,12 +32,12 @@ static inline uint64_t swap64(uint64_t in) } #endif -uint64_t ntohll(uint64_t value) +uint64_t memcached_ntohll(uint64_t value) { return swap64(value); } -uint64_t htonll(uint64_t value) +uint64_t memcached_htonll(uint64_t value) { return swap64(value); } diff --git a/libmemcached/byteorder.h b/libmemcached/byteorder.h index f43dbc43..90a71ee4 100644 --- a/libmemcached/byteorder.h +++ b/libmemcached/byteorder.h @@ -27,10 +27,13 @@ #include "libmemcached/memcached.h" #ifndef HAVE_HTONLL +#define ntohll(a) memcached_ntohll(a) +#define htonll(a) memcached_htonll(a) + LIBMEMCACHED_LOCAL -uint64_t ntohll(uint64_t); +uint64_t memcached_ntohll(uint64_t); LIBMEMCACHED_LOCAL -uint64_t htonll(uint64_t); +uint64_t memcached_htonll(uint64_t); #endif #ifdef linux -- 2.30.2