All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Eric Sandeen <sandeen@redhat.com>
Cc: xfs-oss <xfs@oss.sgi.com>
Subject: [PATCH 1/2 V2] xfs_io: include headers for preadv/pwritev
Date: Tue, 09 Oct 2012 22:37:25 -0500	[thread overview]
Message-ID: <5074ED75.6060106@sandeen.net> (raw)
In-Reply-To: <50749EE2.6070408@redhat.com>

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@redhat.com>
---

V2: Move _BSD_SOURCE to PCFLAGS intead of in source files
per Dave's suggestion.

diff --git a/include/builddefs.in b/include/builddefs.in
index 81ebfcd..04590d2 100644
--- a/include/builddefs.in
+++ b/include/builddefs.in
@@ -106,7 +106,7 @@ GCCFLAGS = -funsigned-char -fno-strict-aliasing -Wall
 #	   -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-decl
 
 ifeq ($(PKG_PLATFORM),linux)
-PCFLAGS = -D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 $(GCCFLAGS)
+PCFLAGS = -D_GNU_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 $(GCCFLAGS)
 DEPENDFLAGS = -D__linux__
 endif
 ifeq ($(PKG_PLATFORM),gnukfreebsd)
diff --git a/io/pread.c b/io/pread.c
index 0b9454b..7e2ed7d 100644
--- a/io/pread.c
+++ b/io/pread.c
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#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..73acbac 100644
--- a/io/pwrite.c
+++ b/io/pwrite.c
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <sys/uio.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 #include <xfs/input.h>

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

  parent reply	other threads:[~2012-10-10  3:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-09 22:02 [PATCH 1/2] xfs_io: include headers for preadv/pwritev Eric Sandeen
2012-10-09 22:08 ` [PATCH 2/2] xfs_io: configure tests for preadv/pwritev & sync_file_range Eric Sandeen
2012-10-09 22:28   ` Dave Chinner
2012-10-09 22:32     ` Eric Sandeen
2012-10-09 22:56       ` Dave Chinner
2012-10-09 22:57         ` Eric Sandeen
2012-10-09 23:05           ` Dave Chinner
2012-10-10  3:40   ` [PATCH 2/2 V2] " Eric Sandeen
2012-10-10 23:25     ` Dave Chinner
2012-10-09 22:21 ` [PATCH 1/2] xfs_io: include headers for preadv/pwritev Dave Chinner
2012-10-10  3:37 ` Eric Sandeen [this message]
2012-10-10 23:24   ` [PATCH 1/2 V2] " Dave Chinner
2012-10-11 20:40 ` [PATCH 1/2] " Mark Tinguely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5074ED75.6060106@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=sandeen@redhat.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.