Merge pull request #179 from michalwy/librbd-compile-fixes

Small fixes needed to compile OCF in C++ environment (Ceph/librbd)
This commit is contained in:
Michal Rakowski 2019-05-30 09:26:54 +02:00 committed by GitHub
commit 3abe91a5ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

4
env/posix/ocf_env.h vendored
View File

@ -473,9 +473,9 @@ static inline long env_atomic64_inc_return(env_atomic64 *a)
return __sync_add_and_fetch(&a->counter, 1);
}
static inline long env_atomic64_cmpxchg(env_atomic64 *a, long old, long new)
static inline long env_atomic64_cmpxchg(env_atomic64 *a, long old_v, long new_v)
{
return __sync_val_compare_and_swap(&a->counter, old, new);
return __sync_val_compare_and_swap(&a->counter, old_v, new_v);
}
/* *** SPIN LOCKS *** */

View File

@ -165,7 +165,7 @@ static inline int ocf_uuid_set_str(ocf_uuid_t uuid, char *str)
*/
static inline const char *ocf_uuid_to_str(const struct ocf_volume_uuid *uuid)
{
return uuid->data;
return (const char *)uuid->data;
}
/**