CentOS 6 compile issues fixed
CentOS 6 compile issues fixed
This commit is contained in:
parent
44900882a5
commit
086e7abe77
@ -58,7 +58,7 @@ int atomic_load_int32(const int *variable)
|
||||
#ifdef MXS_USE_ATOMIC_BUILTINS
|
||||
return __atomic_load_n(variable, __ATOMIC_SEQ_CST);
|
||||
#else
|
||||
return __sync_fetch_and_or(variable, 0);
|
||||
return __sync_fetch_and_or((volatile int *)variable, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ int64_t atomic_load_int64(const int64_t *variable)
|
||||
#ifdef MXS_USE_ATOMIC_BUILTINS
|
||||
return __atomic_load_n(variable, __ATOMIC_SEQ_CST);
|
||||
#else
|
||||
return __sync_fetch_and_or(variable, 0);
|
||||
return __sync_fetch_and_or((volatile int *)variable, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -76,7 +76,7 @@ uint64_t atomic_load_uint64(const uint64_t *variable)
|
||||
#ifdef MXS_USE_ATOMIC_BUILTINS
|
||||
return __atomic_load_n(variable, __ATOMIC_SEQ_CST);
|
||||
#else
|
||||
return __sync_fetch_and_or(variable, 0);
|
||||
return __sync_fetch_and_or((volatile int *)variable, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -85,7 +85,7 @@ void* atomic_load_ptr(void * const *variable)
|
||||
#ifdef MXS_USE_ATOMIC_BUILTINS
|
||||
return __atomic_load_n(variable, __ATOMIC_SEQ_CST);
|
||||
#else
|
||||
return __sync_fetch_and_or(variable, 0);
|
||||
return __sync_fetch_and_or((void **)variable, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -56,6 +56,11 @@
|
||||
#include "maxscale/queuemanager.h"
|
||||
#include "maxscale/service.h"
|
||||
|
||||
/** This define is needed in CentOS 6 systems */
|
||||
#if !defined(UINT64_MAX)
|
||||
#define UINT64_MAX (18446744073709551615UL)
|
||||
#endif
|
||||
|
||||
using std::string;
|
||||
using std::set;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user