Explicitly request that virNumaNodeIsAvailable not be inlined. This fixes the test suite when building with clang (3.5.1). --- This only leaves the mysterious check-protocol failure. And too large stack frame size when building the tests with -O0. src/internal.h | 10 ++++++++++ src/util/virnuma.h | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/internal.h b/src/internal.h index 4d473af..84aa330 100644 --- a/src/internal.h +++ b/src/internal.h @@ -139,6 +139,16 @@ # endif /** + * ATTRIBUTE_NOINLINE: + * + * Macro to indicate a function that cannot be inlined + * (e.g. a function that is mocked in the test suite) + */ +# ifndef ATTRIBUTE_NOINLINE +# define ATTRIBUTE_NOINLINE __attribute__((__noinline__)) +# endif + +/** * ATTRIBUTE_SENTINEL: * * Macro to check for NULL-terminated varargs lists diff --git a/src/util/virnuma.h b/src/util/virnuma.h index 1f3c0ad..4ddcc5a 100644 --- a/src/util/virnuma.h +++ b/src/util/virnuma.h @@ -37,7 +37,8 @@ virBitmapPtr virNumaGetHostNodeset(void); bool virNumaNodesetIsAvailable(virBitmapPtr nodeset); bool virNumaIsAvailable(void); int virNumaGetMaxNode(void); -bool virNumaNodeIsAvailable(int node); +bool virNumaNodeIsAvailable(int node) + ATTRIBUTE_NOINLINE; int virNumaGetDistances(int node, int **distances, int *ndistances); -- 2.0.5 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list