mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-protocol
synced 2026-01-05 11:47:49 +00:00
macros: fix compatibility with non-clang compilers
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
39be7a8fce
commit
b397eca557
@ -47,6 +47,10 @@
|
||||
#define SPICE_GNUC_NULL_TERMINATED
|
||||
#endif
|
||||
|
||||
#ifndef __has_feature
|
||||
#define __has_feature(x) 0 /* Compatibility with non-clang compilers. */
|
||||
#endif
|
||||
|
||||
#if (!defined(__clang__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) || \
|
||||
(defined(__clang__) && __has_feature(__alloc_size__))
|
||||
#define SPICE_GNUC_ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user