summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2015-08-02 08:25:45 -0400
committerJeff Darcy <jdarcy@redhat.com>2015-09-01 07:23:09 -0700
commit8b7af53cb88ab75c0f15c89ce6867a9c6c8a4e67 (patch)
treeb3ca5f31cc2e2fa7cb8e28ad8ff5fd883e9a77fe
parent4d4c7d5dc54850dcf916083b2b1398d9bfe2bfe6 (diff)
build: Fix build on Mac OS X, boolean
bool and true conflict with clang macros in clang on Mac OS X, possibly with newer (?) versions of clang on Linux Change-Id: Ia8c56ae68b4ebffb99b0684ac72d68ec50eaa7fa BUG: 1249391 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/11816 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Susant Palai <spalai@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
-rw-r--r--libglusterfs/src/options.c4
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c3
2 files changed, 3 insertions, 4 deletions
diff --git a/libglusterfs/src/options.c b/libglusterfs/src/options.c
index de5a745449e..c8f2585ae2b 100644
--- a/libglusterfs/src/options.c
+++ b/libglusterfs/src/options.c
@@ -183,13 +183,13 @@ xlator_option_validate_bool (xlator_t *xl, const char *key, const char *value,
{
int ret = -1;
char errstr[256];
- gf_boolean_t bool;
+ gf_boolean_t is_valid;
/* Check if the value is one of
'0|1|on|off|no|yes|true|false|enable|disable' */
- if (gf_string2boolean (value, &bool) != 0) {
+ if (gf_string2boolean (value, &is_valid) != 0) {
snprintf (errstr, 256,
"option %s %s: '%s' is not a valid boolean value",
key, value, value);
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index 3d549b0fb00..ac73a090637 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -1838,7 +1838,6 @@ gf_defrag_task (void *opaque)
struct dht_container *iterator = NULL;
gf_defrag_info_t *defrag = NULL;
int ret = 0;
- gf_boolean_t true = _gf_true;
defrag = (gf_defrag_info_t *)opaque;
@@ -1861,7 +1860,7 @@ gf_defrag_task (void *opaque)
crawler does not go far ahead in filling up the queue.
*/
- while (true) {
+ while (_gf_true) {
if (defrag->defrag_status != GF_DEFRAG_STATUS_STARTED) {
goto out;