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

 



From: Vinson Lee <vlee@xxxxxxxxxxx>

This patch fixes these build errors on CentOS 6.

  CC	syscalls/lseek.o
syscalls/lseek.c:18: error: ‘SEEK_DATA’ undeclared here (not in a function)
syscalls/lseek.c:18: error: ‘SEEK_HOLE’ undeclared here (not in a function)

Signed-off-by: Vinson Lee <vlee@xxxxxxxxxxx>
---
 include/compat.h |    8 ++++++++
 syscalls/lseek.c |    1 +
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/include/compat.h b/include/compat.h
index 30edc81..64af817 100644
--- a/include/compat.h
+++ b/include/compat.h
@@ -910,3 +910,11 @@ struct kvm_get_htab_fd {
 #ifndef SWAP_FLAG_DISCARD
 #define SWAP_FLAG_DISCARD 0x10000
 #endif
+
+/* unistd.h */
+#ifndef SEEK_DATA
+#define SEEK_DATA 3
+#endif
+#ifndef SEEK_HOLE
+#define SEEK_HOLE 4
+#endif
diff --git a/syscalls/lseek.c b/syscalls/lseek.c
index d832e99..a8ca77b 100644
--- a/syscalls/lseek.c
+++ b/syscalls/lseek.c
@@ -4,6 +4,7 @@
 #include <sys/types.h>
 #include <unistd.h>
 #include "sanitise.h"
+#include "compat.h"
 
 struct syscallentry syscall_lseek = {
 	.name = "lseek",
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe trinity" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux