diff options
| author | Christian Hopps <chopps@labn.net> | 2024-03-20 19:20:18 +0000 |
|---|---|---|
| committer | Christian Hopps <chopps@labn.net> | 2024-03-21 15:57:01 +0000 |
| commit | 043a4183c2f10e6117695dec7a0373c1b0a63808 (patch) | |
| tree | c478c15a134030b139d19fec89ad1fd37226ef94 /lib/compiler.h | |
| parent | 617d82e4ce9014a9fad820cd08411c1f19bf6edb (diff) | |
grpc: fix grpc for various failures
lib: don't define a `fallthrough` in c++ to avoid conflict with protobuf c++
check: add link libs required by some versions of grpc++ or it's dependent
linked libs
tests: don't fail the test due to known at exit memleaks
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'lib/compiler.h')
| -rw-r--r-- | lib/compiler.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/compiler.h b/lib/compiler.h index 617b0c265b..03261052a2 100644 --- a/lib/compiler.h +++ b/lib/compiler.h @@ -32,7 +32,7 @@ extern "C" { #if __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 5) # define _RET_NONNULL , returns_nonnull #endif -#if __has_attribute(fallthrough) +#if __has_attribute(fallthrough) && !defined(__cplusplus) # define fallthrough __attribute__((fallthrough)); #endif # define _CONSTRUCTOR(x) constructor(x) @@ -56,7 +56,7 @@ extern "C" { #if __GNUC__ < 5 # define __has_attribute(x) 0 #endif -#if __GNUC__ >= 7 +#if __GNUC__ >= 7 && !defined(__cplusplus) # define fallthrough __attribute__((fallthrough)); #endif #endif @@ -112,7 +112,7 @@ extern "C" { #ifndef _ALLOC_SIZE # define _ALLOC_SIZE(x) #endif -#ifndef fallthrough +#if !defined(fallthrough) && !defined(__cplusplus) #define fallthrough #endif #ifndef _DEPRECATED |
