X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fbyteorder.h;h=99e9f5d196f52e7df4af6b617d2798e5fed3b04a;hb=d4c5a2229396c74f3e66767f01ce4c8853eba92b;hp=0964b61a12313ad253a421bc9b199db1e7bbccf9;hpb=880439e34a123924049dd67fc59a4871d679259c;p=m6w6%2Flibmemcached diff --git a/libmemcached/byteorder.h b/libmemcached/byteorder.h index 0964b61a..99e9f5d1 100644 --- a/libmemcached/byteorder.h +++ b/libmemcached/byteorder.h @@ -12,9 +12,21 @@ #ifndef HAVE_HTONLL LIBMEMCACHED_LOCAL -extern uint64_t ntohll(uint64_t); +uint64_t ntohll(uint64_t); LIBMEMCACHED_LOCAL -extern uint64_t htonll(uint64_t); +uint64_t htonll(uint64_t); +#endif + +#ifdef linux +/* /usr/include/netinet/in.h defines macros from ntohs() to _bswap_nn to + * optimize the conversion functions, but the prototypes generate warnings + * from gcc. The conversion methods isn't the bottleneck for my app, so + * just remove the warnings by undef'ing the optimization .. + */ +#undef ntohs +#undef ntohl +#undef htons +#undef htonl #endif #endif /* LIBMEMCACHED_BYTEORDER_H */