diff options
author | Damjan Marion <dmarion@me.com> | 2021-12-16 12:23:23 +0000 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2021-12-16 15:22:19 +0000 |
commit | 3c9dee27ca33ab88080a03db75d83f09fcc5c589 (patch) | |
tree | 709dc37612f95edcfeac553a1f2e011e93190d4e | |
parent | fd1f56a770301bf116c0e248502f50ca88bff631 (diff) |
vppinfra: clang doesn't know about attribute noclone
Type: fix
Fixes: 88019c40
Change-Id: I219597c95883f49b6ff51e65e6c6c80e3c1518b7
Signed-off-by: Damjan Marion <dmarion@me.com>
-rw-r--r-- | src/vppinfra/clib.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vppinfra/clib.h b/src/vppinfra/clib.h index 50f04e18f84..1b6ab4157d7 100644 --- a/src/vppinfra/clib.h +++ b/src/vppinfra/clib.h @@ -100,7 +100,11 @@ #define __clib_packed __attribute__ ((packed)) #define __clib_constructor __attribute__ ((constructor)) #define __clib_noinline __attribute__ ((noinline)) +#ifdef __clang__ +#define __clib_noclone +#else #define __clib_noclone __attribute__ ((noclone)) +#endif #define __clib_aligned(x) __attribute__ ((aligned(x))) #define __clib_section(s) __attribute__ ((section(s))) #define __clib_warn_unused_result __attribute__ ((warn_unused_result)) |