splice.h: SPLICE_F_UNMAP definition update
authorJens Axboe <jens.axboe@oracle.com>
Wed, 13 Jun 2007 13:16:50 +0000 (15:16 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Wed, 13 Jun 2007 13:16:50 +0000 (15:16 +0200)
That flag was introduced after the others, so check for it
seperately in the header. Fixes compile on systems splice
in the /usr/include headers.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
splice.h

index 5321662662f6c5a12a23328cd1ae3780a1cf6d4d..66075a1be540391f52996753165a91928738bfe2 100644 (file)
--- a/splice.h
+++ b/splice.h
                                 /* from/to, of course */
 #define SPLICE_F_MORE  (0x04)  /* expect more data */
 #define SPLICE_F_GIFT   (0x08)  /* pages passed in are a gift */
-#define SPLICE_F_UNMAP (0x10)  /* undo vmsplice map */
 
 #endif /* SPLICE_F_MOVE defined */
 
+/*
+ * SPLICE_F_UNMAP was introduced later, so check for that seperately
+ */
+#ifndef SPLICE_F_UNMAP
+#define SPLICE_F_UNMAP (0x10)  /* undo vmsplice map */
+#endif
+
 static inline int ssplice(int fdin, loff_t *off_in, int fdout, loff_t *off_out,
                          size_t len, unsigned int flags)
 {