diff options
Diffstat (limited to 'roms/skiboot/ccan/str/test/compile_fail-strstr.c')
-rw-r--r-- | roms/skiboot/ccan/str/test/compile_fail-strstr.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/roms/skiboot/ccan/str/test/compile_fail-strstr.c b/roms/skiboot/ccan/str/test/compile_fail-strstr.c new file mode 100644 index 000000000..deefef654 --- /dev/null +++ b/roms/skiboot/ccan/str/test/compile_fail-strstr.c @@ -0,0 +1,18 @@ +#define CCAN_STR_DEBUG 1 +#include <ccan/str/str.h> + +int main(int argc, char *argv[]) +{ +#ifdef FAIL +#if !HAVE_TYPEOF + #error We need typeof to check strstr. +#endif +#else + const +#endif + char *ret; + const char *str = "hello"; + + ret = strstr(str, "hell"); + return ret ? 0 : 1; +} |