summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLance Richardson <lrichard@redhat.com>2016-03-15 11:52:59 -0400
committerBen Pfaff <blp@ovn.org>2016-03-22 18:45:22 -0700
commit8d679ccdf10fdf9d11e9744c25f5a80154f02032 (patch)
tree633c0681f96466106b060f04159bfaaa5b4551ba /lib
parent97d0619c1174fe5bdc9cd40d6a8f2a2ffe3ba6ed (diff)
downloadopenvswitch-8d679ccdf10fdf9d11e9744c25f5a80154f02032.tar.gz
byte-order: use system ntohll() and htonll() for OS X
Avoid collision with system headers when building under OS X. Signed-off-by: Lance Richardson <lrichard@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/byte-order.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/byte-order.h b/lib/byte-order.h
index 3430e2909..41c39315c 100644
--- a/lib/byte-order.h
+++ b/lib/byte-order.h
@@ -22,7 +22,7 @@
#include "openvswitch/types.h"
#ifndef __CHECKER__
-#ifndef _WIN32
+#if !(defined(_WIN32) || defined(__MACH__))
static inline ovs_be64
htonll(uint64_t n)
{
@@ -34,7 +34,7 @@ ntohll(ovs_be64 n)
{
return htonl(1) == 1 ? n : ((uint64_t) ntohl(n) << 32) | ntohl(n >> 32);
}
-#endif /* _WIN32 */
+#endif /* !(defined(_WIN32) || defined(__MACH__)) */
#else
/* Making sparse happy with these functions also makes them unreadable, so
* don't bother to show it their implementations. */