summaryrefslogtreecommitdiff
path: root/lib/vma-iter.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2017-04-19 01:03:34 +0200
committerBruno Haible <bruno@clisp.org>2017-04-19 01:03:34 +0200
commit3a82bb79c68b1bf814ad1f5e7c5e34bbe6697a26 (patch)
tree558dceb85e3c05b593ec8a22db536c46a089c363 /lib/vma-iter.c
parent37d5dc0daaa653a307f193d2f2851f38f88fbb7c (diff)
downloadgnulib-3a82bb79c68b1bf814ad1f5e7c5e34bbe6697a26.tar.gz
vma-iter: Fix conflict with module 'largefile' on 32-bit Solaris 9.
* modules/vma-iter (configure.ac): Test whether <sys/procfs.h> can be included. * lib/vma-iter.c: On Solaris, test HAVE_SYS_PROCFS_H before including <sys/procfs.h>. * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Don't define on Solaris when <sys/procfs.h> cannot be included. Reported by Tom G. Christensen <tgc@jupiterrise.com>.
Diffstat (limited to 'lib/vma-iter.c')
-rw-r--r--lib/vma-iter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/vma-iter.c b/lib/vma-iter.c
index 7356188f15..d4bae13183 100644
--- a/lib/vma-iter.c
+++ b/lib/vma-iter.c
@@ -32,7 +32,7 @@
# include <sys/procfs.h> /* PIOC*, prmap_t */
#endif
-#if defined __sun /* Solaris */
+#if defined __sun && HAVE_SYS_PROCFS_H /* Solaris */
# include <string.h> /* memcpy */
# include <sys/types.h>
# include <sys/mman.h> /* mmap, munmap */
@@ -378,7 +378,7 @@ vma_iterate (vma_iterate_callback_fn callback, void *data)
close (fd);
return -1;
-#elif defined __sun /* Solaris */
+#elif defined __sun && HAVE_SYS_PROCFS_H /* Solaris */
/* Note: Solaris <sys/procfs.h> defines a different type prmap_t with
_STRUCTURED_PROC than without! Here's a table of sizeof(prmap_t):