configurator: HAVE_PROC_SELF_MAPS
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 5 Dec 2011 03:46:33 +0000 (14:16 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 5 Dec 2011 03:46:33 +0000 (14:16 +1030)
config.h
tools/configurator/configurator.c

index 912730e33dbbab8cb2b9ed3c28d07e0623bd4728..03b8c5bb870ea9bc51ce877ac07da1f10e471cf4 100644 (file)
--- a/config.h
+++ b/config.h
@@ -40,6 +40,7 @@
 #define HAVE_LITTLE_ENDIAN 1
 #define HAVE_MEMMEM 1
 #define HAVE_MMAP 1
 #define HAVE_LITTLE_ENDIAN 1
 #define HAVE_MEMMEM 1
 #define HAVE_MMAP 1
+#define HAVE_PROC_SELF_MAPS 1
 #define HAVE_QSORT_R_PRIVATE_LAST 1
 #define HAVE_STACK_GROWS_UPWARDS 0
 #define HAVE_STATEMENT_EXPR 1
 #define HAVE_QSORT_R_PRIVATE_LAST 1
 #define HAVE_STACK_GROWS_UPWARDS 0
 #define HAVE_STATEMENT_EXPR 1
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"
          "}" },
          "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"
        { "HAVE_QSORT_R_PRIVATE_LAST",
          DEFINES_EVERYTHING|EXECUTE|MAY_NOT_COMPILE, NULL,
          "#define _GNU_SOURCE 1\n"