spa: utils: cleanup: fix GCC version check

GCC 10 seems to support dereferencing incomplete types in `__typeof__`.
This commit is contained in:
Barnabás Pőcze 2023-09-16 17:10:07 +02:00
parent 3fec887a5f
commit 7191ccb0b8

View file

@ -41,7 +41,7 @@ __extension__ ({ \
_old_value; \ _old_value; \
}) })
#if __GNUC__ > 10 || defined(__clang__) #if __GNUC__ >= 10 || defined(__clang__)
#define spa_steal_ptr(ptr) ((__typeof__(*(ptr)) *) spa_exchange((ptr), NULL)) #define spa_steal_ptr(ptr) ((__typeof__(*(ptr)) *) spa_exchange((ptr), NULL))
#else #else
#define spa_steal_ptr(ptr) ((__typeof__(ptr)) spa_exchange((ptr), NULL)) #define spa_steal_ptr(ptr) ((__typeof__(ptr)) spa_exchange((ptr), NULL))