From: Noah Watkins Date: Sat, 7 Dec 2013 17:59:13 +0000 (-0800) Subject: librbd: rename howmany to avoid conflict X-Git-Tag: v0.74~14^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3b39a8a9f1c114ad5fbfca47d6f6949ea42e95ac;p=ceph.git librbd: rename howmany to avoid conflict A howmany macro exists on some platforms in standard headers, but there really isn't any sort of standard that I've found. We just avoid the conflict entirely this way. Signed-off-by: Noah Watkins --- diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc index 4185f36b1815..f7899053a375 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -28,7 +28,7 @@ #undef dout_prefix #define dout_prefix *_dout << "librbd: " -#define howmany(x, y) (((x) + (y) - 1) / (y)) +#define rbd_howmany(x, y) (((x) + (y) - 1) / (y)) using std::map; using std::pair; @@ -119,7 +119,7 @@ namespace librbd { ictx->snap_lock.put_read(); ictx->md_lock.put_read(); info.obj_size = 1ULL << obj_order; - info.num_objs = howmany(info.size, ictx->get_object_size()); + info.num_objs = rbd_howmany(info.size, ictx->get_object_size()); info.order = obj_order; memcpy(&info.block_name_prefix, ictx->object_prefix.c_str(), min((size_t)RBD_MAX_BLOCK_NAME_SIZE,