[PATCH 1/2] xfs_io: include headers for preadv/pwritev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We need to include uio.h to avoid:

    [CC]     pread.o
pread.c: In function ‘do_pread’:
pread.c:198: warning: implicit declaration of function ‘preadv’
    [CC]     pwrite.o
pwrite.c: In function ‘do_pwrite’:
pwrite.c:85: warning: implicit declaration of function ‘pwritev’

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---

diff --git a/io/pread.c b/io/pread.c
index 0b9454b..9fad373 100644
--- a/io/pread.c
+++ b/io/pread.c
@@ -16,6 +16,8 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#define _BSD_SOURCE 	/* for preadv */
+#include <sys/uio.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 #include <xfs/input.h>
diff --git a/io/pwrite.c b/io/pwrite.c
index 3689960..848b990 100644
--- a/io/pwrite.c
+++ b/io/pwrite.c
@@ -16,6 +16,8 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#define _BSD_SOURCE 	/* for pwritev */
+#include <sys/uio.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 #include <xfs/input.h>

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs



[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux