From 5887216aa53cdb4709e9658462c4d4b2141ef91a Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 29 Mar 2012 14:58:33 +1030 Subject: [PATCH] asort: fix test when typesafe_cb not supported. Solaris CC seems to support typeof, but not __builtin_types_compatible_p. --- ccan/asort/test/compile_fail-context-type.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ccan/asort/test/compile_fail-context-type.c b/ccan/asort/test/compile_fail-context-type.c index 62d16c5e..473d1026 100644 --- a/ccan/asort/test/compile_fail-context-type.c +++ b/ccan/asort/test/compile_fail-context-type.c @@ -9,9 +9,10 @@ static int cmp(char *const *a, char *const *b, int *flag) int main(int argc, char **argv) { #ifdef FAIL +#if HAVE_TYPEOF && HAVE_BUILTIN_CHOOSE_EXPR && HAVE_BUILTIN_TYPES_COMPATIBLE_P char flag; -#if !HAVE_TYPEOF -#error "Unfortunately we don't fail if no typeof." +#else +#error "Unfortunately we don't fail if no typecheck_cb support." #endif #else int flag; -- 2.39.2