mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
__STDC_VERSION__ may be undefined
Clang++ (and g++) don't define __STDC_VERSION__ which results in include/spa/support/log.h:101:5: error: '__STDC_VERSION__' is not defined, evaluates to 0 [-Werror,-Wundef] #if __STDC_VERSION__ >= 199901L include/pipewire/log.h:64:5: error: '__STDC_VERSION__' is not defined, evaluates to 0 [-Werror,-Wundef] #if __STDC_VERSION__ >= 199901L so check if __STDC_VERSION__ is defined before comparing. Also, include/feature.h additionally defines __USE_ISOC99 (and __USE_ISOC11 for C11 extension), so check these as well.
This commit is contained in:
parent
e38cba4e13
commit
871dd2743b
2 changed files with 4 additions and 2 deletions
|
|
@ -98,7 +98,8 @@ struct spa_log {
|
|||
|
||||
#define spa_log_level_enabled(l,lev) ((l) && (l)->level >= (lev))
|
||||
|
||||
#if __STDC_VERSION__ >= 199901L
|
||||
#if defined(__USE_ISOC11) || defined(__USE_ISOC99) || \
|
||||
(defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
|
||||
|
||||
#define spa_log_log(l,lev,...) \
|
||||
if (SPA_UNLIKELY (spa_log_level_enabled (l, lev))) \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue