diff options
author | Giulio Benetti <giulio.benetti@benettiengineering.com> | 2025-04-04 22:17:49 +0200 |
---|---|---|
committer | Bernd Schubert <bernd@bsbernd.com> | 2025-04-04 23:25:06 +0200 |
commit | 197ea99fe4520b1ada8a4f2e3e1dcaf6de145002 (patch) | |
tree | 95c2a3b923b535d07d9366c1cef747d6965508cc /include/fuse_common.h | |
parent | 206f4a4ec05cb7ce2f8f47c8f5b4b2c80ea221a2 (diff) | |
download | libfuse-197ea99fe4520b1ada8a4f2e3e1dcaf6de145002.tar.gz |
Fix static_assert build failure with C++ version < 11
At the moment build fails due to lack of static_assert:
https://gitlab.com/jolivain/buildroot/-/jobs/9606292537
this means that the check per date is not enough, so let's use meson to
check if static_assert() is present or not and simplify
fuse_static_assert() definition by only checking HAVE_STATIC_ASSERT.
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Diffstat (limited to 'include/fuse_common.h')
-rw-r--r-- | include/fuse_common.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/include/fuse_common.h b/include/fuse_common.h index 77efc5d..582505f 100644 --- a/include/fuse_common.h +++ b/include/fuse_common.h @@ -30,9 +30,7 @@ #define FUSE_MAKE_VERSION(maj, min) ((maj) * 100 + (min)) #define FUSE_VERSION FUSE_MAKE_VERSION(FUSE_MAJOR_VERSION, FUSE_MINOR_VERSION) -#if (defined(__cplusplus) && __cplusplus >= 201103L) || \ - (!defined(__cplusplus) && defined(__STDC_VERSION__) && \ - __STDC_VERSION__ >= 201112L) +#ifdef HAVE_STATIC_ASSERT #define fuse_static_assert(condition, message) static_assert(condition, message) #else #define fuse_static_assert(condition, message) |