From af1a266670d040d2f4083ff309d732d648afba2a Mon Sep 17 00:00:00 2001 From: Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> Date: Tue, 10 Oct 2023 14:33:42 +0000 Subject: Add submodule dependency files Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec --- roms/skiboot/ccan/str/test/compile_fail-strchr.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 roms/skiboot/ccan/str/test/compile_fail-strchr.c (limited to 'roms/skiboot/ccan/str/test/compile_fail-strchr.c') diff --git a/roms/skiboot/ccan/str/test/compile_fail-strchr.c b/roms/skiboot/ccan/str/test/compile_fail-strchr.c new file mode 100644 index 000000000..74a7314d0 --- /dev/null +++ b/roms/skiboot/ccan/str/test/compile_fail-strchr.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 = strchr(str, 'l'); + return ret ? 0 : 1; +} -- cgit