[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 06/13] virtiofsd: replace _Static_assert with QEMU_BUILD_BUG_O
From: |
marcandre . lureau |
Subject: |
[PATCH v3 06/13] virtiofsd: replace _Static_assert with QEMU_BUILD_BUG_ON |
Date: |
Thu, 10 Dec 2020 17:47:45 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
This allows to get rid of a check for older GCC version (which was a bit
bogus too since it was falling back on c++ version..)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
tools/virtiofsd/fuse_common.h | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/tools/virtiofsd/fuse_common.h b/tools/virtiofsd/fuse_common.h
index 5aee5193eb..a2484060b6 100644
--- a/tools/virtiofsd/fuse_common.h
+++ b/tools/virtiofsd/fuse_common.h
@@ -809,15 +809,6 @@ void fuse_remove_signal_handlers(struct fuse_session *se);
*
* On 32bit systems please add -D_FILE_OFFSET_BITS=64 to your compile flags!
*/
-
-#if defined(__GNUC__) && \
- (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 6) && \
- !defined __cplusplus
-_Static_assert(sizeof(off_t) == 8, "fuse: off_t must be 64bit");
-#else
-struct _fuse_off_t_must_be_64bit_dummy_struct {
- unsigned _fuse_off_t_must_be_64bit:((sizeof(off_t) == 8) ? 1 : -1);
-};
-#endif
+QEMU_BUILD_BUG_ON(sizeof(off_t) != 8);
#endif /* FUSE_COMMON_H_ */
--
2.29.0
- [PATCH v3 01/13] qemu/atomic: Drop special case for unsupported compiler, (continued)
- [PATCH v3 04/13] qemu-plugin.h: remove GCC < 4, marcandre . lureau, 2020/12/10
- [PATCH v3 05/13] tests: remove GCC < 4 fallbacks, marcandre . lureau, 2020/12/10
- [PATCH v3 06/13] virtiofsd: replace _Static_assert with QEMU_BUILD_BUG_ON,
marcandre . lureau <=
- [PATCH v3 07/13] compiler.h: explicit case for Clang printf attribute, marcandre . lureau, 2020/12/10
- [PATCH v3 08/13] audio: remove GNUC & MSVC check, marcandre . lureau, 2020/12/10
[PATCH v3 09/13] poison: remove GNUC check, marcandre . lureau, 2020/12/10