configurator: Return pointer difference as ptrdiff_t
[ccan] / tools / configurator / configurator.c
index 75c59f86db947263b2a0aa190d8119cfee3934b4..c7577c0cb661f028585d1aac397af363a6e7cb4e 100644 (file)
@@ -278,7 +278,8 @@ static struct test tests[] = {
          "     return __stop_mysec - __start_mysec;\n"
          "}\n" },
        { "HAVE_STACK_GROWS_UPWARDS", DEFINES_EVERYTHING|EXECUTE, NULL, NULL,
-         "static long nest(const void *base, unsigned int i)\n"
+         "#include <stddef.h>\n"
+         "static ptrdiff_t nest(const void *base, unsigned int i)\n"
          "{\n"
          "     if (i == 0)\n"
          "             return (const char *)&i - (const char *)base;\n"