X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fasearch%2Ftest%2Fcompile_fail-return-value-const.c;h=9797672bd08438012b83958fea22fae584e61bf8;hb=e5fb923ba3735c758ef795eb69d5ee1c6f0a94e9;hp=2edee935012ff2c2352710e9d88120a962f6ab47;hpb=93d1e1063c6b5599ab334398234d2de05c1236e8;p=ccan diff --git a/ccan/asearch/test/compile_fail-return-value-const.c b/ccan/asearch/test/compile_fail-return-value-const.c index 2edee935..9797672b 100644 --- a/ccan/asearch/test/compile_fail-return-value-const.c +++ b/ccan/asearch/test/compile_fail-return-value-const.c @@ -2,7 +2,9 @@ #include #include -static int cmp(const char *key, const char *const *elem) +#include + +static int cmp(const char *key, const char *const *elem, void *ctx) { return strcmp(key, *elem); } @@ -20,6 +22,6 @@ int main(void) #else const char **p; #endif - p = asearch(key, elems, ARRAY_SIZE(elems), cmp); + p = asearch(key, elems, ARRAY_SIZE(elems), cmp, NULL); return p ? 0 : 1; }