X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fbyteorder.h;h=254641f81dfaaf01f56cf3696837e5e4942e1791;hb=f6c04131cc9952372e3f63de2db4edc9f8181fb2;hp=0964b61a12313ad253a421bc9b199db1e7bbccf9;hpb=f2fabd2f29fa624e4d48b1605bd46b233e7ce408;p=m6w6%2Flibmemcached diff --git a/libmemcached/byteorder.h b/libmemcached/byteorder.h index 0964b61a..254641f8 100644 --- a/libmemcached/byteorder.h +++ b/libmemcached/byteorder.h @@ -17,4 +17,16 @@ LIBMEMCACHED_LOCAL extern 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 */