This repository was archived by the owner on Aug 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,15 @@ CHASSIS_API GHashTable* chassis_stats_get(chassis_stats_t *user_data);
4141
4242#define CHASSIS_STATS_ALLOC_INC_NAME (name ) ((chassis_global_stats != NULL) ? g_atomic_int_inc(&(chassis_global_stats->name ## _alloc)) : (void)0)
4343#define CHASSIS_STATS_FREE_INC_NAME (name ) ((chassis_global_stats != NULL) ? g_atomic_int_inc(&(chassis_global_stats->name ## _free)) : (void)0)
44+
45+ /* the prototype of g_atomic_int_add() changed in 2.30.0 to
46+ * return a gint instead of nothing (void)
47+ */
48+ #if GLIB_CHECK_VERSION (2 , 30 , 0 )
4449#define CHASSIS_STATS_ADD_NAME (name , addme ) ((chassis_global_stats != NULL) ? g_atomic_int_add(&(chassis_global_stats->name), addme) : 0)
50+ #else
51+ #define CHASSIS_STATS_ADD_NAME (name , addme ) ((chassis_global_stats != NULL) ? g_atomic_int_add(&(chassis_global_stats->name), addme) : (void)0)
52+ #endif
4553#define CHASSIS_STATS_GET_NAME (name ) ((chassis_global_stats != NULL) ? g_atomic_int_get(&(chassis_global_stats->name)) : 0)
4654#define CHASSIS_STATS_SET_NAME (name , setme ) ((chassis_global_stats != NULL) ? g_atomic_int_set(&(chassis_global_stats->name), setme) : (void)0)
4755
You can’t perform that action at this time.
0 commit comments