]> git.ozlabs.org Git - ccan/blobdiff - tools/configurator/configurator.c
configurator: HAVE_PROC_SELF_MAPS
[ccan] / tools / configurator / configurator.c
index a8c5c8d49bf98ab6d159a0cf6d1c82dd47c9e5a6..8353f08899aede35f7c947e6724e80fa4e1ab482 100644 (file)
@@ -161,6 +161,13 @@ static struct test tests[] = {
          "static void *func(int fd) {\n"
          "     return mmap(0, 65536, PROT_READ, MAP_SHARED, fd, 0);\n"
          "}" },
+       { "HAVE_PROC_SELF_MAPS", DEFINES_EVERYTHING|EXECUTE, NULL,
+         "#include <sys/types.h>\n"
+         "#include <sys/stat.h>\n"
+         "#include <sys/fcntl.h>\n"
+         "int main(void) {\n"
+         "     return open(\"/proc/self/maps\", O_RDONLY) != -1 ? 0 : 1;\n"
+         "}\n" },
        { "HAVE_QSORT_R_PRIVATE_LAST",
          DEFINES_EVERYTHING|EXECUTE|MAY_NOT_COMPILE, NULL,
          "#define _GNU_SOURCE 1\n"