aboutsummaryrefslogtreecommitdiff
path: root/gold/fileread.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2010-06-15 16:54:26 +0000
committerIan Lance Taylor <ian@airs.com>2010-06-15 16:54:26 +0000
commit68ed838c0d5d6e20450e43264ce2e60981d085d0 (patch)
tree50b706ea011644542bd0e51c08a96b8bcb3ae910 /gold/fileread.cc
parent4e29fb547ead13cd1f2856f1af3d4029a81ea196 (diff)
downloadgdb-68ed838c0d5d6e20450e43264ce2e60981d085d0.zip
gdb-68ed838c0d5d6e20450e43264ce2e60981d085d0.tar.gz
gdb-68ed838c0d5d6e20450e43264ce2e60981d085d0.tar.bz2
* fileread.cc: Only #include <sys/uio.h> if HAVE_READV.
(struct iovec): Correct !HAVE_READV definition.
Diffstat (limited to 'gold/fileread.cc')
-rw-r--r--gold/fileread.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/gold/fileread.cc b/gold/fileread.cc
index dc5539f..10e1dec 100644
--- a/gold/fileread.cc
+++ b/gold/fileread.cc
@@ -27,7 +27,11 @@
#include <fcntl.h>
#include <unistd.h>
#include <sys/mman.h>
+
+#ifdef HAVE_READV
#include <sys/uio.h>
+#endif
+
#include <sys/stat.h>
#include "filenames.h"
@@ -42,7 +46,7 @@
#include "fileread.h"
#ifndef HAVE_READV
-struct iovec { void* iov_base; size_t iov_len };
+struct iovec { void* iov_base; size_t iov_len; };
ssize_t
readv(int, const iovec*, int)
{